1900
InsertControlItem / UserEditor / A2X:

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h,hX

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:ConditionalFormats():Add("1 = 1"):Bold := .T.
		oG2antt:Columns():Add("Type"):Alignment := 2/*RightAlignment*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("1. A ProgID such as " + CHR(34) + "MSCAL.Calendar.7" + CHR(34) + "")
			oItems:SetProperty("ItemDivider",h,0)
			hX := oItems:InsertControlItem(0,"MSCAL.Calendar","")
			oItems:ItemObject(hX):SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
			h := oItems:AddItem("2. A CLSID such as " + CHR(34) + "{0036F83C-D892-4B7B-AA0B-BEDD8D16A738}" + CHR(34) + "")
			oItems:SetProperty("ItemDivider",h,0)
			hX := oItems:InsertControlItem(0,"{0036F83C-D892-4B7B-AA0B-BEDD8D16A738}","")
			h := oItems:AddItem("3. A URL such as " + CHR(34) + "http://www.exontrol.com" + CHR(34) + "")
			oItems:SetProperty("ItemDivider",h,0)
			hX := oItems:InsertControlItem(0,"http://www.exontrol.com","")
			h := oItems:AddItem("4. A reference to an Active document such as " + CHR(34) + "file://\\Documents\MyDoc.doc" + CHR(34) + "")
			oItems:SetProperty("ItemDivider",h,0)
			hX := oItems:InsertControlItem(0,"file://C:\empesting.xml","")
			h := oItems:AddItem("5.A fragment of HTML such as " + CHR(34) + "MSHTML:<HTML><BODY>This is a line of text</BODY></HTML>" + CHR(34) + "")
			oItems:SetProperty("ItemDivider",h,0)
			hX := oItems:InsertControlItem(0,"MSHTML:<HTML><BODY>This is a <b>line of</b> text</BODY></HTML>","")
			oItems:SetProperty("ItemHeight",hX,56)
			h := oItems:AddItem("6.Anything, if it is preffixed by " + CHR(34) + "A2X:" + CHR(34) + "")
			oItems:SetProperty("ItemDivider",h,0)
			hX := oItems:InsertControlItem(0,"A2X:TOC24.Toc24Ctrl.1","")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1899
How do I add a RichTextBox editor
PROCEDURE OnUserEditorOleEvent(oG2antt,Object,Ev,CloseEditor,Item,ColIndex)
	DevOut( Transform(Ev,"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oEditor
	LOCAL oItems
	LOCAL oRichTextBox

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:UserEditorOleEvent := {|Object,Ev,CloseEditor,Item,ColIndex| OnUserEditorOleEvent(oG2antt,Object,Ev,CloseEditor,Item,ColIndex)} /*Occurs when an user editor fires an event.*/

		oG2antt:BeginUpdate()
		oG2antt:DrawGridLines := -1/*exAllLines*/
		oG2antt:DefaultItemHeight := 32
		oEditor := oG2antt:Columns():Add("RICHTEXT"):Editor()
			oEditor:EditType := 16/*UserEditorType*/
			oEditor:UserEditor("RICHTEXT.RichtextCtrl","")
			oRichTextBox := oEditor:UserEditorObject()
				oRichTextBox:AutoVerbMenu := .T.
				oRichTextBox:TextRTF := "{\rtf1\ansi{\fonttbl\f0\fswiss Helvetica;}\f0\pard\r\nThis is some {\b bold} text.\par\r\n}"
		oItems := oG2antt:Items()
			oItems:AddItem("RICHTEXT.RichtextCtrl")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1898
Is it possible to trap a double-click event on a specific cell and when that happens, to set the cell to a specific value
PROCEDURE OnDblClick(oG2antt,Shift,X,Y)
	LOCAL h
	h := oG2antt:ItemFromPoint(-1,-1,c,hit)
	DevOut( Transform(oG2antt:Items:CellValue(h,c),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:DblClick := {|Shift,X,Y| OnDblClick(oG2antt,Shift,X,Y)} /*Occurs when the user dblclk the left mouse button over an object.*/

		oG2antt:BeginUpdate()
		oG2antt:HeaderAppearance := 4/*Etched*/
		oG2antt:DrawGridLines := -2/*exRowLines*/
		oG2antt:Columns():Add("C1")
		oG2antt:Columns():Add("C2")
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem("Item 1"),1,"Item 2")
			oItems:SetProperty("CellValue",oItems:AddItem("Item 3"),1,"Item 4")
			oItems:SetProperty("CellValue",oItems:AddItem("Item 5"),1,"Item 6")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1897
How can I display dates in DD/MM/YYYY format

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ScrollBySingleLine := .F.
		oG2antt:Columns():Add("Date")
		oItems := oG2antt:Items()
			oItems:SetProperty("ItemDivider",oItems:AddItem("Different Date Formats"),0)
			oItems:SetProperty("FormatCell",oItems:AddItem("12/01/1971"),0,"((shortdateF(value) mid 4) left 2) + `/` + (shortdateF (value) left 2) + `/` + (shortdateF (value) right 4)")
			oItems:SetProperty("FormatCell",oItems:AddItem("12/01/1971"),0,"(1 array (0:=(shortdateF(value) split `/`))) + `/` + (0 array (=:0) ) + `/` + (2 array (=:0) )")
			oItems:SetProperty("FormatCell",oItems:AddItem("12/01/1971"),0,"((`0` + day(value) ) right 2) + `/` + ((`0` + month(value) ) right 2) + `/` + year(value)")
			oItems:SetProperty("FormatCell",oItems:AddItem("12/01/1971"),0,"day(value) + `/` + month(value) + `/` + year(value)")
			oItems:SetProperty("FormatCell",oItems:AddItem("12/01/1971"),0,"year(value) + ` - ` + day(value) + ` - ` + month(value)")
			h := oItems:AddItem("12/01/1971")
			oItems:SetProperty("ItemHeight",h,24)
			oItems:SetProperty("CellValueFormat",h,0,1/*exHTML*/)
			oItems:SetProperty("FormatCell",h,0,"`<b>` + year(value) + `</b><off -4> ` + day(value) + ` - ` + month(value)")
			oItems:SetProperty("ItemDivider",oItems:AddItem("Predefined Date Formats"),0)
			oItems:SetProperty("FormatCell",oItems:AddItem("12/01/1971"),0,"value")
			oItems:SetProperty("FormatCell",oItems:AddItem("12/01/1971"),0,"shortdateF(value)")
			oItems:SetProperty("FormatCell",oItems:AddItem("12/01/1971"),0,"shortdate(value)")
			oItems:SetProperty("FormatCell",oItems:AddItem("12/01/1971"),0,"longdate(value)")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1896
I have noticed that the column gets resized once I release the mouse. I have a column that displays multiple-lines cells, and the text gets wrapped only when user releases the mouse. Is it possible to get resized contiguously as I had before
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ScrollBySingleLine := .F.
		oG2antt:DrawGridLines := 2/*exVLines*/
		oG2antt:ColumnsAllowSizing := .T.
		oG2antt:Columns():Add("Column A (cont)"):SetProperty("Def",64/*exColumnResizeContiguously*/,.T.)
		oG2antt:Columns():Add("Column 1")
		oG2antt:Columns():Add("Column B (cont)"):SetProperty("Def",64/*exColumnResizeContiguously*/,.T.)
		oG2antt:Columns():Add("Column 2")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1895
How do I get the column from cursor, when it hovers the empty portion of the items section
PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	LOCAL i
	i := oG2antt:ItemFromPoint(0,-1,c,hit)
	DevOut( "Column" )
	DevOut( Transform(c,"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oG2antt:BeginUpdate()
		oG2antt:DrawGridLines := 2/*exVLines*/
		oG2antt:Columns():Add("Column 0")
		oG2antt:Columns():Add("Column 1")
		oG2antt:Columns():Add("Column 2")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1894
How do I add items once the user clicks the empty area
PROCEDURE OnClick(oG2antt)
	LOCAL oItems
	LOCAL i
	i := oG2antt:ItemFromPoint(0,-1,c,hit)
	oItems := oG2antt:Items()
		oItems:SetProperty("CellValue",oItems:AddItem(i),1,c)
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Click := {|| OnClick(oG2antt)} /*Occurs when the user presses and then releases the left mouse button over the tree control.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Number of Items to Add")
		oG2antt:Columns():Add("Click on Column")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1893
Is there an easy way to get an effect like in a Microsoft Access / SQL-Server Table view, where you can scroll-up till the last row containing data is displayed as top-row

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Task",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oG2antt:HasLines := 0/*exNoLine*/
		oG2antt:ColumnAutoResize := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",1/*adOpenKeyset*/,1/*adLockReadOnly*/)
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "10/21/1994"
			oChart:LevelCount := 2
		oG2antt:DataSource := rs
		oG2antt:ScrollBars := 2051/*exVScrollEmptySpace+exBoth*/
		oG2antt:SetProperty("ScrollPos",.T.,oG2antt:Items:ItemCount())
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1892
Is there any option to stop events
PROCEDURE OnAddItem(oG2antt,Item)
	DevOut( "AddItem event is fired only if FreezeEvents(False) is called" )
RETURN

PROCEDURE OnAddLink(oG2antt,LinkKey)
	DevOut( "AddLink event is fired only if FreezeEvents(False) is called" )
RETURN

PROCEDURE OnBarResize(oG2antt,Item,Key)
	DevOut( "BarResize event is fired only if FreezeEvents(False) is called" )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/
		oG2antt:AddLink := {|LinkKey| OnAddLink(oG2antt,LinkKey)} /*Occurs when the user links two bars using the mouse.*/
		oG2antt:BarResize := {|Item,Key| OnBarResize(oG2antt,Item,Key)} /*Occurs when a bar is moved or resized.*/

		oG2antt:FreezeEvents(.T.)
		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 24
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,48)
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/02/2001","01/04/2001","")
			oItems:AddLink("L1",h1,"",h2,"")
			oItems:SchedulePDM(0,"")
		oG2antt:EndUpdate()
		oG2antt:FreezeEvents(.F.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1891
How do I specify a more intensive color if using RenderType property

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oBar,oBar1
	LOCAL oChart
	LOCAL oItems
	LOCAL hSummaryJ,hSummaryK,hTaskJ,hTaskK

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:RenderType := -16777216
			oAppearance:Add(1,"gBFLBCJwBAEHhEJAAEhABN0GACAADACAxRDAMgBQKAAzQFAYahuGSGAAGMYxQgmFgAQhFcZQSKUOQTDKMIziYBYJhEMQyDAAUIjOKsIhkGYcZAGQBJCjWGodQLOEgwHIERQjEyUJAGGQIHhyPYbUbGUpQHKkeRtGqgBgoKhKEouNYgAbGYIwTRsdyfDSXBpEWwbDgkNQwWTDNoRDIUQStCysaYjOpnfrUAJ1P7FdQ1NJkXRhGSSK7maapaiCSZ6STCMj1FhVKSNJ7DQKhGpgKh/ApgYpQOK4fLNXyRBK4QAyKA6bgPFZOZbFViaXY1V5bNKrcjhHQwAyHJ4XXRdV4YRAkUT4GqiJKGSYcQhuXZWbRqO6ABhef6DRThc6jKpFHIE4llEcojHqSZNgoIxnlgd5thsLREleL43gsYZ9BkaAYkMAgAm+CxGDWWAtiKCRfjcdRgHoHYnicUwgAIEIREAaQYkcQZUHIGRUDQJBOEYRAhDYCxGgMZAkCgdYQha" +;
		"XQIAYERwQuahXggdgeG6VZ4H4IhdiIGIOB8YIiGiHZZgqYpGF4KYHiKCI+CAU5jCiTQ2g0YhEFyax4gABAEIC")
			oAppearance:Add(2,"gBFLBCJwBAEHhEJAAEhABU0IQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRhGcTAJBMIhiGQYAChEZxVhEMgzDjIAxSJAcQRFESaAABGCQGh+N4/S4NIi0CIsZQjCaiZ7pKA5bgMCo+UrNMixZQVCSOGChYRpCaZWpGGodQRUFbVHAlKypJKCKrEWSrDhuYAAW7XM7yBS1TzVNSuLZtaLqSroAJ1WTWMB0Ra8NzZEKfaZACj4arKejrRDCMAggI=")
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars:Item("Task")
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18)
				oBar:SetProperty("Color",0x1000000)
			oBar1 := oChart:Bars:Item("Summary")
				oBar1:SetProperty("Def",4/*exBarHAlignCaption*/,18)
				oBar1:SetProperty("Color",0x2000000)
		oItems := oG2antt:Items()
			hSummaryJ := oItems:AddItem("Summary A")
			oItems:AddBar(hSummaryJ,"Summary","01/02/2001","01/02/2001","J")
			hTaskJ := oItems:InsertItem(hSummaryJ,,"Task A.1")
			oItems:AddBar(hTaskJ,"Task","01/02/2001","01/05/2001","J1")
			hTaskJ := oItems:InsertItem(hSummaryJ,,"Task A.2")
			oItems:AddBar(hTaskJ,"Task","01/04/2001","01/08/2001","J2")
			oItems:DefineSummaryBars(hSummaryJ,"J",-1,"<*>")
			hSummaryK := oItems:AddItem("Summary B")
			oItems:AddBar(hSummaryK,"Summary","01/02/2001","01/02/2001","K")
			hTaskK := oItems:InsertItem(hSummaryK,,"Task B.1")
			oItems:AddBar(hTaskK,"Task","01/02/2001","01/05/2001","K1")
			hTaskK := oItems:InsertItem(hSummaryK,,"Task B.2")
			oItems:AddBar(hTaskK,"Task","01/04/2001","01/08/2001","K2")
			oItems:DefineSummaryBars(hSummaryK,"K",-1,"<*>")
			oItems:SetProperty("ItemBar",0,"<K*>",33/*exBarColor*/,255)
			oItems:SetProperty("ExpandItem",0,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1890
How can I include the child items, when a filter is applied

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumns
	LOCAL oItems
	LOCAL h0

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ColumnAutoResize := .T.
		oG2antt:ContinueColumnScroll := .F.
		oG2antt:MarkSearchColumn := .F.
		oG2antt:SearchColumnIndex := 1
		oG2antt:Indent := 16
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:FilterBarPromptVisible := -1/*0xffffc0e8+exFilterBarTop+exFilterBarShort+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oG2antt:FilterBarPromptPattern := "Nancy"
		oG2antt:FilterInclude := 1/*exItemsWithChilds*/
		oG2antt:Chart():LevelCount := 2
		oColumns := oG2antt:Columns()
			oColumns:Add("Name"):Width := 96
			oColumns:Add("Title"):Width := 96
			oColumns:Add("City")
		oItems := oG2antt:Items()
			h0 := oItems:AddItem("Nancy Davolio")
			oItems:SetProperty("CellValue",h0,1,"Sales Representative")
			oItems:SetProperty("CellValue",h0,2,"Seattle")
			h0 := oItems:InsertItem(h0,,"Andrew Fuller")
			oItems:SetProperty("CellValue",h0,1,"Vice President, Sales")
			oItems:SetProperty("CellValue",h0,2,"Tacoma")
			h0 := oItems:InsertItem(h0,,"Michael Suyama")
			oItems:SetProperty("CellValue",h0,1,"Sales Representative")
			oItems:SetProperty("CellValue",h0,2,"London")
			h0 := oItems:AddItem("Janet Leverling")
			oItems:SetProperty("CellValue",h0,1,"Sales Representative")
			oItems:SetProperty("CellValue",h0,2,"Kirkland")
			h0 := oItems:InsertItem(h0,,"Margaret Peacock")
			oItems:SetProperty("CellValue",h0,1,"Sales Representative")
			oItems:SetProperty("CellValue",h0,2,"Redmond")
			oItems:SetProperty("ExpandItem",0,.T.)
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1889
Is it possible to change the date format shown when you scroll the horizontal bar on the chart

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Chart():ToolTip := "<b>Date</b><br><%loc_ldate%>"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1888
How do I change the drop down filter icon/button (white)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oChart
	LOCAL oColumn

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:Add(2,"gBFLBCJwBAEHhEJAAEhABX8GACAADACAxSDEMQBQKAAzQFAYbhgHCGAAGQaBUgmFgAQhFcZQSKUOQTDKNYykCIRSDUJYkSZEIyjBI8ExXFqNACkGKwYgmNYiTLAcgANJ0WBaGIZJ4gOT5fDKMoEDRRYADFCscwxJybQAqGQKKb+VgAVY/cTyBIAEQSKA0TDOQ5TSKWB4JPZQRBEbZMNBtBIUJquKaqShdQJCU5FdY3Xblez9P7AMBwLFEC4NQ8YNYuPhjR4dRTIMhvVAsUArFh8Zg9GZZFjmDIDT4ydBLTQwcyVIKnP5qOa6XbmPoCQDYKxZHYxPzVDa3axuL76dqCAT7XrXNy1TbNRrzQKfcJqfCbdw2YaDZLOOT3fjuI4hhKaRzFAHJ+jYQ4xHuY4gHuGIXGeExqC8Tp6C+PoEm+G5ImycRgh0XwvDGa5rgOeoejyXwnFeQp2mkf5ClgBB9gCWIYAwfYAEKV58mkdwOggNArgOXY2EWLoDkKOA0mg" +;
		"bhOGgZApgaSBIHWSYHSmbApgYThmESZYJkIeIkgeCpfliLIHgpMIcmUYYYmODAlg2SI4mWfRfGOEguDcCRjFYAJihCQhJBSDoRmONgKEcI4kFCEJhhOVYTmYnAlEAQhWBMJYJGYWoWmWSR2F6F5lnkWAQhUAgpEieRWEuSYkjWGpmkmNhuhuZwJkYcocmaaYkjyEhngnUA6lEFAlAEgI=")
			oAppearance:Add(1,"CP:2 -4 -4 2 4")
		oG2antt:SetProperty("Background",0/*exHeaderFilterBarButton*/,0x1000000)
		oG2antt:SetProperty("Background",32/*exCursorHoverColumn*/,oG2antt:BackColor())
		oG2antt:HeaderAppearance := 0/*None2*/
		oG2antt:SetProperty("BackColorHeader",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oG2antt:HeaderHeight := 24
		oColumn := oG2antt:Columns():Add("Filter")
			oColumn:DisplayFilterButton := .T.
			oColumn:AllowSort := .F.
			oColumn:AllowDragging := .F.
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,196)
			oChart:LevelCount := 2
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1887
How do I prevent changing the cell's state ( check-box state )

PROCEDURE OnCellStateChanging(oG2antt,Item,ColIndex,NewState)
	LOCAL oItems
	oItems := oG2antt:Items()
		NewState := oItems:CellState(Item,ColIndex)
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:CellStateChanging := {|Item,ColIndex,NewState| OnCellStateChanging(oG2antt,Item,ColIndex,NewState)} /*Fired before cell's state is about to be changed.*/

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oG2antt:Columns():Add("P1")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oColumn1 := oG2antt:Columns():Add("P2")
			oColumn1:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn1:PartialCheck := .T.
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1886
How do I change the color of the columns's header to cover all levels

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn,oColumn1
	LOCAL oColumns
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DrawGridLines := -1/*exAllLines*/
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColorHeader())
		oG2antt:HeaderAppearance := 4/*Etched*/
		oG2antt:DefaultItemHeight := 36
		oG2antt:TreeColumnIndex := -1
		oColumns := oG2antt:Columns()
			oColumn := oColumns:Add("C1")
				oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
				oColumn:Width := 24
				oColumn:AllowSizing := .F.
				oColumn:SetProperty("Def",48/*exCellPaddingLeft*/,3)
			oColumn1 := oColumns:Add("C2")
				oColumn1:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
				oColumn1:SetProperty("Def",48/*exCellPaddingLeft*/,2)
			oColumns:Add("Column1")
		oChart := oG2antt:Chart()
			oChart:SetProperty("BackColorLevelHeader",oG2antt:BackColorHeader())
			oChart:LevelCount := 2
			oChart:DrawGridLines := -1/*exAllLines*/
			oChart:FirstVisibleDate := "06/22/2014"
			oChart:SetProperty("PaneWidth",.F.,256)
		oItems := oG2antt:Items()
			h := oItems:AddItem("")
			oItems:SetProperty("CellValue",h,1,"Cell 1.2")
			oItems:SetProperty("CellValue",h,2,"Cell 1.3")
			oItems:AddBar(h,"Task","06/23/2014","06/25/2014")
			h := oItems:AddItem("")
			oItems:SetProperty("CellValue",h,1,"Cell 2.2")
			oItems:SetProperty("CellValue",h,2,"Cell 2.3")
			oItems:AddBar(h,"Task","06/26/2014","06/28/2014")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1885
Is it possible to extend the columns's header to fill all levels

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn,oColumn1
	LOCAL oColumns
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DrawGridLines := -1/*exAllLines*/
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oG2antt:HeaderAppearance := 4/*Etched*/
		oG2antt:DefaultItemHeight := 36
		oG2antt:TreeColumnIndex := -1
		oColumns := oG2antt:Columns()
			oColumn := oColumns:Add("C1")
				oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
				oColumn:Width := 24
				oColumn:AllowSizing := .F.
				oColumn:SetProperty("Def",48/*exCellPaddingLeft*/,3)
			oColumn1 := oColumns:Add("C2")
				oColumn1:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
				oColumn1:SetProperty("Def",48/*exCellPaddingLeft*/,2)
			oColumns:Add("Column1")
		oChart := oG2antt:Chart()
			oChart:SetProperty("BackColorLevelHeader",oG2antt:BackColorHeader())
			oChart:LevelCount := 2
			oChart:DrawGridLines := -1/*exAllLines*/
			oChart:FirstVisibleDate := "06/22/2014"
			oChart:SetProperty("PaneWidth",.F.,256)
		oItems := oG2antt:Items()
			h := oItems:AddItem("")
			oItems:SetProperty("CellValue",h,1,"Cell 1.2")
			oItems:SetProperty("CellValue",h,2,"Cell 1.3")
			oItems:AddBar(h,"Task","06/23/2014","06/25/2014")
			h := oItems:AddItem("")
			oItems:SetProperty("CellValue",h,1,"Cell 2.2")
			oItems:SetProperty("CellValue",h,2,"Cell 2.3")
			oItems:AddBar(h,"Task","06/26/2014","06/28/2014")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1884
How do I change the color of the columns's header to cover all levels (sample CRD)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn,oColumn1,oColumn2
	LOCAL oColumns
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DrawGridLines := -1/*exAllLines*/
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColorHeader())
		oG2antt:HeaderAppearance := 4/*Etched*/
		oG2antt:DefaultItemHeight := 36
		oG2antt:TreeColumnIndex := -1
		oColumns := oG2antt:Columns()
			oColumn := oColumns:Add("C1")
				oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
				oColumn:Width := 24
				oColumn:AllowSizing := .F.
				oColumn:SetProperty("Def",48/*exCellPaddingLeft*/,3)
			oColumn1 := oColumns:Add("C2")
				oColumn1:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
				oColumn1:SetProperty("Def",48/*exCellPaddingLeft*/,2)
			oColumns:Add("Column1"):Visible := .F.
			oColumns:Add("Column2"):Visible := .F.
			oColumns:Add("Column3"):Visible := .F.
			oColumn2 := oColumns:Add("FormatLevel")
				oColumn2:FormatLevel := "18;" + CHR(34) + "Info" + CHR(34) + "[a=17]/(2/3,4)"
				oColumn2:SetProperty("Def",32/*exCellFormatLevel*/,"2/3,4")
		oChart := oG2antt:Chart()
			oChart:DrawGridLines := -1/*exAllLines*/
			oChart:FirstVisibleDate := "06/22/2014"
			oChart:SetProperty("PaneWidth",.F.,256)
			oChart:SetProperty("BackColorLevelHeader",oG2antt:BackColorHeader())
		oItems := oG2antt:Items()
			h := oItems:AddItem("")
			oItems:SetProperty("CellValue",h,1,"Cell 1.2")
			oItems:SetProperty("CellValue",h,2,"Cell 1.3")
			oItems:AddBar(h,"Task","06/23/2014","06/25/2014")
			h := oItems:AddItem("")
			oItems:SetProperty("CellValue",h,1,"Cell 2.2")
			oItems:SetProperty("CellValue",h,2,"Cell 2.3")
			oItems:AddBar(h,"Task","06/26/2014","06/28/2014")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1883
Is it possible to extend the columns's header to fill all levels (sample CRD)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn,oColumn1,oColumn2
	LOCAL oColumns
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DrawGridLines := -1/*exAllLines*/
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oG2antt:HeaderAppearance := 4/*Etched*/
		oG2antt:DefaultItemHeight := 36
		oG2antt:TreeColumnIndex := -1
		oColumns := oG2antt:Columns()
			oColumn := oColumns:Add("C1")
				oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
				oColumn:Width := 24
				oColumn:AllowSizing := .F.
				oColumn:SetProperty("Def",48/*exCellPaddingLeft*/,3)
			oColumn1 := oColumns:Add("C2")
				oColumn1:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
				oColumn1:SetProperty("Def",48/*exCellPaddingLeft*/,2)
			oColumns:Add("Column1"):Visible := .F.
			oColumns:Add("Column2"):Visible := .F.
			oColumns:Add("Column3"):Visible := .F.
			oColumn2 := oColumns:Add("FormatLevel")
				oColumn2:FormatLevel := "18;" + CHR(34) + "Info" + CHR(34) + "[a=17]/(2/3,4)"
				oColumn2:SetProperty("Def",32/*exCellFormatLevel*/,"2/3,4")
		oChart := oG2antt:Chart()
			oChart:DrawGridLines := -1/*exAllLines*/
			oChart:FirstVisibleDate := "06/22/2014"
			oChart:SetProperty("PaneWidth",.F.,256)
			oChart:SetProperty("BackColorLevelHeader",oG2antt:BackColorHeader())
		oItems := oG2antt:Items()
			h := oItems:AddItem("")
			oItems:SetProperty("CellValue",h,1,"Cell 1.2")
			oItems:SetProperty("CellValue",h,2,"Cell 1.3")
			oItems:AddBar(h,"Task","06/23/2014","06/25/2014")
			h := oItems:AddItem("")
			oItems:SetProperty("CellValue",h,1,"Cell 2.2")
			oItems:SetProperty("CellValue",h,2,"Cell 2.3")
			oItems:AddBar(h,"Task","06/26/2014","06/28/2014")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1882
How do I get sorted the column as string, numeric, date, date and time. Also how can it be applied to drop down filter panel

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1,oColumn2,oColumn3,oColumn4
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oColumn := oG2antt:Columns():Add("Date")
			oColumn:SortType := 2/*SortDate*/
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .F.
			oColumn:DisplayFilterDate := .T.
			oColumn:FilterList := 1296/*exShowFocusItem+exShowCheckBox+exSortItemsDesc*/
		oColumn1 := oG2antt:Columns():Add("DateTime")
			oColumn1:SortType := 3/*SortDateTime*/
			oColumn1:DisplayFilterButton := .T.
			oColumn1:DisplayFilterPattern := .F.
			oColumn1:FilterList := 1296/*exShowFocusItem+exShowCheckBox+exSortItemsDesc*/
		oColumn2 := oG2antt:Columns():Add("Time")
			oColumn2:SortType := 4/*SortTime*/
			oColumn2:DisplayFilterButton := .T.
			oColumn2:DisplayFilterPattern := .F.
			oColumn2:FilterList := 1296/*exShowFocusItem+exShowCheckBox+exSortItemsDesc*/
			oColumn2:FormatColumn := "time(value)"
		oColumn3 := oG2antt:Columns():Add("Numeric")
			oColumn3:SortType := 1/*SortNumeric*/
			oColumn3:DisplayFilterButton := .T.
			oColumn3:FilterList := 1296/*exShowFocusItem+exShowCheckBox+exSortItemsDesc*/
		oColumn4 := oG2antt:Columns():Add("String")
			oColumn4:DisplayFilterButton := .T.
			oColumn4:FilterList := 1296/*exShowFocusItem+exShowCheckBox+exSortItemsDesc*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("01/27/2010")
			oItems:SetProperty("CellValue",h,1,"01/27/2010 10:00:00")
			oItems:SetProperty("CellValue",h,2,oItems:CellValue(h,1))
			oItems:SetProperty("CellValue",h,3,1)
			oItems:SetProperty("CellValue",h,4,oItems:CellValue(h,3))
			h := oItems:AddItem("01/27/2011")
			oItems:SetProperty("CellValue",h,1,"01/27/2011 09:00:00")
			oItems:SetProperty("CellValue",h,2,oItems:CellValue(h,1))
			oItems:SetProperty("CellValue",h,3,11)
			oItems:SetProperty("CellValue",h,4,oItems:CellValue(h,3))
			h := oItems:AddItem("11/02/2010")
			oItems:SetProperty("CellValue",h,1,"11/02/2010 09:00:00")
			oItems:SetProperty("CellValue",h,2,oItems:CellValue(h,1))
			oItems:SetProperty("CellValue",h,3,2)
			oItems:SetProperty("CellValue",h,4,oItems:CellValue(h,3))
		oG2antt:Columns:Item("DateTime"):DisplayFilterDate := .F.
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1881
Is there a way to set the time zone per item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,48)
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task A")
			oItems:AddBar(h1,"","01/02/2001","01/18/2001","TZ1","Time Zone / Item")
			oItems:SetProperty("ItemBar",h1,"TZ1",29/*exBarSelectable*/,.F.)
			oItems:SetProperty("ItemBar",h1,"TZ1",7/*exBarBackColor*/,255)
			oItems:AddBar(h1,"Task","01/20/2001","01/29/2001","Z1")
			h1 := oItems:AddItem("Task B")
			oItems:AddBar(h1,"","01/06/2001","01/24/2001","TZ2","Time Zone / Item")
			oItems:SetProperty("ItemBar",h1,"TZ2",29/*exBarSelectable*/,.F.)
			oItems:SetProperty("ItemBar",h1,"TZ2",7/*exBarBackColor*/,65535)
			oItems:AddBar(h1,"Task","01/03/2001","01/12/2001","Z1")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1880
Is there a way to turn arrow-key-navigation between the items on and off
PROCEDURE OnKeyDown(oG2antt,KeyCode,Shift)
	KeyCode := 0
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems
	LOCAL h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:KeyDown := {|KeyCode,Shift| OnKeyDown(oG2antt,KeyCode,Shift)} /*Occurs when the user presses a key while an object has the focus.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oColumn := oG2antt:Columns():Add("Effort")
			oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,21)
			oColumn:Editor():EditType := 4/*SpinType*/
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:NonworkingDays := 0
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:FirstVisibleDate := "06/20/2005"
			oChart:HistogramVisible := .T.
			oChart:HistogramHeight := 128
			oChart:HistogramView := 112/*exHistogramAllItems*/
			oBar := oChart:Bars:Item("Task")
				oBar:HistogramPattern := oBar:Pattern()
				oBar:HistogramType := 0/*exHistOverload*/
				oBar:HistogramCriticalValue := 3
				oBar:ShowHistogramValues := "value>3?255:1"
				oBar:HistogramItems := -11
				oBar:SetProperty("HistogramGridLinesColor",AutomationTranslateColor( GraMakeRGBColor  ( { 192,192,192 } )  , .F. ))
				oBar:SetProperty("HistogramRulerLinesColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,1 } )  , .F. ))
				oBar:FormatHistogramValues := "value format `2`"
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","06/21/2005","06/23/2005")
			oItems:SetProperty("CellValue",h1,1,6.79)
			h1 := oItems:AddItem("Task 2")
			oItems:AddBar(h1,"Task","06/24/2005","06/26/2005")
			oItems:SetProperty("CellValue",h1,1,3.19)
			h1 := oItems:AddItem("Task 3")
			oItems:AddBar(h1,"Task","06/27/2005","06/29/2005")
			oItems:SetProperty("CellValue",h1,1,2)
			h1 := oItems:AddItem("Task 4")
			oItems:AddBar(h1,"Task","06/30/2005","07/02/2005")
			oItems:SetProperty("CellValue",h1,1,1)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1879
I am using Layout property to sort multiple columns at once. The problem is that all items get expanded. How do I prevent that

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oG2antt:Columns():Add("P1")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oColumn1 := oG2antt:Columns():Add("P2")
			oColumn1:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn1:PartialCheck := .T.
			oColumn1:FormatColumn := "1 index ``"
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child A")
			oItems:InsertItem(h,,"Child B")
			oItems:InsertItem(h,,"Child A")
			oItems:InsertItem(h,,"Child B")
			oItems:AddItem("Root")
			oItems:AddItem("Root")
		oG2antt:SingleSort := .F.
		oG2antt:Layout := "multiplesort=" + CHR(34) + "C0:1 C1:2" + CHR(34) + ";collapse=" + CHR(34) + "" + CHR(34) + ""
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1878
How can I decode the Layout property

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumns
	LOCAL oPrint
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oColumns := oG2antt:Columns()
			oColumns:Add("C1")
			oColumns:Add("C2"):Position := 1
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem("SubItem 1.1"),1,"SubItem 1.2")
			oItems:SetProperty("CellValue",oItems:AddItem("SubItem 2.1"),1,"SubItem 2.2")
		oG2antt:Columns:Item("C2"):SortOrder := 2/*SortDescending*/
		oG2antt:EndUpdate()
		DevOut( "Encoded:" )
		DevOut( oG2antt:Layout() )
		oPrint := CreateObject("Exontrol.Print")
			DevOut( "Decoded: " )
			DevOut( oPrint:Decode64TextW(oG2antt:Layout()) )

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1877
Is it possible to define a bar inside a bar (method 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL oNote
	LOCAL oNotes
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:Columns():Add("Task")
		oG2antt:DrawGridLines := 1/*exHLines*/
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:DrawGridLines := 1/*exHLines*/
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
			oChart:AllowLinkBars := .F.
			oChart:ResizeUnitScale := 65536/*exHour*/
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:Bars:Item("Task"):OverlaidType := 515/*exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Tasks")
			oItems:AddBar(h,"Task","01/03/2001","01/07/2001","A1")
			oItems:AddBar(h,"Task","01/04/2001","01/08/2001","A2")
			oItems:AddBar(h,"Task","01/09/2001","01/13/2001","A3")
		oNotes := oG2antt:Chart():Notes()
			oNote := oNotes:Add("N1",oG2antt:Items():FirstVisibleItem(),"A1","")
				oNote:SetProperty("PartText",0/*exNoteStart*/," ")
				oNote:SetProperty("PartFixedWidth",0/*exNoteStart*/,18)
				oNote:SetProperty("PartFixedHeight",0/*exNoteStart*/,11)
				oNote:SetProperty("PartCanMove",0/*exNoteStart*/,.T.)
				oNote:SetProperty("PartBackColor",0/*exNoteStart*/,AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))
				oNote:SetProperty("PartVisible",1/*exNoteEnd*/,.F.)
				oNote:ShowLink := 0/*exNoteLinkHidden*/
				oNote:SetProperty("PartVOffset",0/*exNoteStart*/,4)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1876
Is it possible to define a bar inside a bar (method 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar,oBar1,oBar2
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:Columns():Add("Task")
		oG2antt:DrawGridLines := 1/*exHLines*/
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:DrawGridLines := 1/*exHLines*/
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
			oChart:AllowLinkBars := .F.
			oChart:ResizeUnitScale := 65536/*exHour*/
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars:Item("Task")
				oBar:OverlaidType := 515/*exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/
				oBar:OverlaidGroup := "Task,TaskB"
			oBar1 := oChart:Bars():Add("Aka")
				oBar1:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))
				oBar1:Pattern := 1/*exPatternSolid*/
			oBar2 := oChart:Bars():Add("Task%Aka")
				oBar2:Shortcut := "TaskB"
				oBar2:OverlaidType := 515/*exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/
				oBar2:OverlaidGroup := "Task,TaskB"
		oItems := oG2antt:Items()
			h := oItems:AddItem("Tasks")
			oItems:AddBar(h,"TaskB","01/03/2001","01/07/2001","A1")
			oItems:SetProperty("ItemBar",h,"A1",12/*exBarPercent*/,0.25)
			oItems:AddBar(h,"Task","01/04/2001","01/08/2001","A2")
			oItems:AddBar(h,"Task","01/09/2001","01/13/2001","A3")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1875
How do I show the bar with a solid color, no border (method 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:Columns():Add("Task")
		oG2antt:DrawGridLines := 1/*exHLines*/
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:DrawGridLines := 1/*exHLines*/
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
			oChart:AllowLinkBars := .F.
			oChart:ResizeUnitScale := 65536/*exHour*/
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars:Item("Task")
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
				oBar:Pattern := 1/*exPatternSolid*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task")
			oItems:AddBar(h,"Task","01/02/2001","01/05/2001","")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1874
How do I show the bar with a solid color, no border (method 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:Columns():Add("Task")
		oG2antt:DrawGridLines := 1/*exHLines*/
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:DrawGridLines := 1/*exHLines*/
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
			oChart:AllowLinkBars := .F.
			oChart:ResizeUnitScale := 65536/*exHour*/
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars:Item("Task")
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
				oBar:SetProperty("StartColor",oBar:Color())
				oBar:SetProperty("EndColor",oBar:Color())
				oBar:Pattern := 32/*exPatternBox*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task")
			oItems:AddBar(h,"Task","01/02/2001","01/05/2001","")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1873
How do I show the bar with a solid color, no border (method 3)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:Columns():Add("Task")
		oG2antt:DrawGridLines := 1/*exHLines*/
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:DrawGridLines := 1/*exHLines*/
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
			oChart:AllowLinkBars := .F.
			oChart:ResizeUnitScale := 65536/*exHour*/
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:RenderType := -1
			oAppearance:Add(1,"gBFLBCJwBAEHhEJAAEhABJkIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyDQKkEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQiiCYsS5AcgPfKgAAFESNY5gSL5Yj2IjrRDCMAggI")
		oBar := oG2antt:Chart():Bars:Item("Task")
			oBar:SetProperty("Color",0x10000ff)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task")
			oItems:AddBar(h,"Task","01/02/2001","01/05/2001","")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1872
How do I find the cell's type, or what the cell holds

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DrawGridLines := -2/*exRowLines*/
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oColumns := oG2antt:Columns()
			oColumns:Add("Value"):Width := 24
			oColumns:Add("Type"):FormatColumn := "type(%0)"
			oColumns:Add("TypeAsString"):FormatColumn := "(0 := type(%0)) array (`empty`, `null`, `short`, `long`, `float`, `double`, `currency`, `date`, `string`, `object`, `error`, `boolean`, `variant`, `any`, `reserved`, `decimal`, `char`, `byte`, `unsigned short`, `unsigned long`, `long on 64 bits`)"
			oColumns:Add("Length"):FormatColumn := "len(%0)"
		oItems := oG2antt:Items()
			oItems:AddItem()
			oItems:AddItem("")
			oItems:SetProperty("CellValue",:AddItem(),0,oG2antt)
			oItems:SetProperty("CellValue",oItems:AddItem(),0,.T.)
			oItems:SetProperty("CellValue",oItems:AddItem(),0,-1)
			oItems:SetProperty("CellValue",oItems:AddItem(),0,-1)
			oItems:SetProperty("CellValue",oItems:AddItem(),0,"01/01/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1871
Is it possible to allow changing the bar's parent while bar's start/end margins should stay unchanged
PROCEDURE OnBarParentChange(oG2antt,Item,Key,NewItem,Cancel)
	oG2antt:Items():SetProperty("SelectItem",NewItem,.T.)
	DevOut( "BarParentChange from " )
	DevOut( oG2antt:Items:CellCaption(Item,0) )
	DevOut( " to " )
	DevOut( oG2antt:Items:CellCaption(NewItem,0) )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BarParentChange := {|Item,Key,NewItem,Cancel| OnBarParentChange(oG2antt,Item,Key,NewItem,Cancel)} /*Occurs just before moving a bar from current item to another item.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Members"):SetProperty("Def",17/*exCellValueFormat*/,1)
		oG2antt:SelBackMode := 1/*exTransparent*/
		oChart := oG2antt:Chart()
			oChart:SetProperty("SelBackColor",oG2antt:SelBackColor())
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:AllowLinkBars := .F.
			oChart:AllowCreateBar := 0/*exNoCreateBar*/
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,96)
			oBar := oChart:Bars:Item("Task")
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18)
				oBar:SetProperty("Def",10/*exBarCanResize*/,.F.)
		oItems := oG2antt:Items()
			oItems:AddItem("Member <b>1</b>")
			h := oItems:AddItem("Member <b>2</b>")
			oItems:AddBar(h,"Task","09/21/2006","09/23/2006","T102","Task <b>102</b>")
			oItems:SetProperty("ItemBar",h,"T102",11/*exBarCanMove*/,.F.)
			oItems:SetProperty("ItemBar",h,"T102",28/*exBarCanMoveToAnother*/,.T.)
			oItems:AddItem("Member <b>3</b>")
			oItems:AddItem("Member <b>4</b>")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1870
Is it possible to (un)highlight the day/night shifts

PROCEDURE OnClick(oG2antt)
	LOCAL oChart
	oChart := oG2antt:Chart()
		oChart:ShowNonworkingDates := .F.
		oChart:ShowNonworkingHours := .F.
		oChart:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
	oG2antt:Refresh()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Click := {|| OnClick(oG2antt)} /*Occurs when the user presses and then releases the left mouse button over the tree control.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 2
			oChart:UnitScale := 4096/*exDay*/
			oChart:UnitWidth := 64
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:NonworkingHours := 15728895
			oChart:NonworkingHoursPattern := 1/*exPatternSolid*/
			oChart:NonworkingDaysPattern := oChart:NonworkingHoursPattern()
			oChart:SetProperty("NonworkingHoursColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
			oChart:SetProperty("NonworkingDaysColor",AutomationTranslateColor( GraMakeRGBColor  ( { 212,212,212 } )  , .F. ))
			oChart:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 250,250,250 } )  , .F. ))
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1869
How can I add a vertical line at specified date-time

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,18)
			oChart:LevelCount := 2
			oChart:UnitWidth := 32
			oChart:FirstVisibleDate := "01/01/2010"
			oChart:MarkTimeZone("M1","01/05/2010","01/05/2010",16711680,"50:5;3")
			oChart:MarkTimeZone("M2","01/06/2010","01/06/2010",16711680,":5")
			oChart:MarkTimeZone("M3","01/07/2010 10:00:00","01/07/2010 10:00:00",255,"50:3;;zone")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1868
How do I clear all date-time zones
PROCEDURE OnClick(oG2antt)
	oG2antt:Chart():RemoveTimeZone("<*>")
RETURN

PROCEDURE OnRClick(oG2antt)
	oG2antt:Chart():RemoveTimeZone("<Z*>")
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Click := {|| OnClick(oG2antt)} /*Occurs when the user presses and then releases the left mouse button over the tree control.*/
		oG2antt:RClick := {|| OnRClick(oG2antt)} /*Fired when right mouse button is clicked*/

		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,18)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2010"
			oChart:MarkTimeZone("Z1","01/04/2010","01/05/2010",255)
			oChart:MarkTimeZone("Z2","01/11/2010","01/12/2010",65280)
			oChart:MarkTimeZone("M1","01/07/2010","01/08/2010",16711680,"50:5;3")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1867
How do I place a comment above/bellow the bar (sample 4)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 26
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,64)
			oBar := oChart:Bars:Item("Task")
				oBar:SetProperty("Def",5/*exBarVAlignCaption*/,18)
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,0)
				oBar:SetProperty("Def",44/*exBarExtraCaption*/," ")
				oBar:SetProperty("Def",45/*exBarExtraCaptionHAlign*/,0)
				oBar:SetProperty("Def",46/*exBarExtraCaptionVAlign*/,16)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","K1","<font ;6>user comment")
			oItems:SetProperty("ItemBar",h,"K1",44/*exBarExtraCaption*/,"<font ;6>user comment")
			oItems:AddBar(h,"Task","01/09/2001","01/13/2001","K2","<font ;6>user comment")
			oItems:SetProperty("ItemBar",h,"K2",44/*exBarExtraCaption*/,"<font ;6>user comment")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1866
How do I place a comment above/bellow the bar (sample 3)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 26
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,64)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","K1","<font ;6>user comment")
			oItems:SetProperty("ItemBar",h,"K1",5/*exBarVAlignCaption*/,18)
			oItems:SetProperty("ItemBar",h,"K1",4/*exBarHAlignCaption*/,0)
			oItems:SetProperty("ItemBar",h,"K1",44/*exBarExtraCaption*/,"<font ;6>user comment")
			oItems:SetProperty("ItemBar",h,"K1",45/*exBarExtraCaptionHAlign*/,0)
			oItems:SetProperty("ItemBar",h,"K1",46/*exBarExtraCaptionVAlign*/,16)
			oItems:AddBar(h,"Task","01/09/2001","01/13/2001","K2","<font ;6>user comment")
			oItems:SetProperty("ItemBar",h,"K2",44/*exBarExtraCaption*/,"<font ;6>user comment")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1865
How do I place a comment under the bar (sample 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 26
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,64)
			oBar := oChart:Bars:Item("Task")
				oBar:SetProperty("Def",5/*exBarVAlignCaption*/,18)
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,0)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","K1","<font ;6>user comment")
			oItems:AddBar(h,"Task","01/09/2001","01/13/2001","K2","<font ;6>user comment")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1864
How do I place a comment under the bar (sample 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 26
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,64)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","K1","<font ;6>user comment")
			oItems:SetProperty("ItemBar",h,"K1",5/*exBarVAlignCaption*/,18)
			oItems:SetProperty("ItemBar",h,"K1",4/*exBarHAlignCaption*/,0)
			oItems:AddBar(h,"Task","01/09/2001","01/13/2001","K2","<font ;6>user comment")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1863
I am using exBarCanMoveToAnother to allow a bar to be moved from one item to another. The question is if it is possible somehow to highlight the current bar can be dropped to (sample 2)

PROCEDURE OnBarParentChange(oG2antt,Item,Key,NewItem,Cancel)
	oG2antt:Items():SetProperty("SelectItem",NewItem,.T.)
	Cancel := oG2antt:ConditionalFormats:Item("NOTRED"):Verify(NewItem)
RETURN

PROCEDURE OnChartEndChanging(oG2antt,Operation)
	oG2antt:SetProperty("SelForeColor",0x8000000e)
	oG2antt:SetProperty("SelBackColor",0x8000000d)
	oG2antt:Chart():SetProperty("SelBackColor",oG2antt:SelBackColor())
	oG2antt:ConditionalFormats():Clear()
RETURN

PROCEDURE OnChartStartChanging(oG2antt,Operation)
	LOCAL oChart
	LOCAL oConditionalFormat,oConditionalFormat1
	oG2antt:SetProperty("SelForeColor",oG2antt:ForeColor())
	oG2antt:SetProperty("SelBackColor",oG2antt:BackColor())
	oChart := oG2antt:Chart()
		oChart:SetProperty("SelBackColor",oChart:BackColor())
	oConditionalFormat := oG2antt:ConditionalFormats():Add("%0 contains `Allowed` ","RED")
		oConditionalFormat:Enabled := .F.
	oConditionalFormat1 := oG2antt:ConditionalFormats():Add("not ( %0 contains `Allowed` )","NOTRED")
		oConditionalFormat1:SetProperty("BackColor",0x1fefefe)
		oConditionalFormat1:SetProperty("ChartBackColor",oConditionalFormat1:BackColor())
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BarParentChange := {|Item,Key,NewItem,Cancel| OnBarParentChange(oG2antt,Item,Key,NewItem,Cancel)} /*Occurs just before moving a bar from current item to another item.*/
		oG2antt:ChartEndChanging := {|Operation| OnChartEndChanging(oG2antt,Operation)} /*Occurs after the chart has been changed.*/
		oG2antt:ChartStartChanging := {|Operation| OnChartStartChanging(oG2antt,Operation)} /*Occurs when the chart is about to be changed.*/

		oG2antt:BeginUpdate()
		oG2antt:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAAEhABZkIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyDQKkEwsACEIrjKCRShyCYZRrGUgRCKQahLEiTIhGUYJHgmK4tRoAUbyDBIGQSCCZYDmKA3fj0AI9P7FcgSABEEigNIxToOU4jFgeCR2TqQRK1BDQbQSFCaZrmMKIXICO40WBQFhTdLlRyBBKzLKtCyaBqWaZrWxZE72ZaFVTdOK6bDvGwoarid56X7beA2PgdZTjQi5cCxG5sLrTBZtYzfET3diOEYPQzHMpzDB7bxbGaXZBlGSZbjeGZBUjQc7yfSNMw/HqKZQ6cQwTAIgI")
		oG2antt:Columns():Add("Members"):SetProperty("Def",17/*exCellValueFormat*/,1)
		oChart := oG2antt:Chart()
			oChart:SetProperty("SelBackColor",oG2antt:SelBackColor())
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:AllowLinkBars := .F.
			oChart:AllowCreateBar := 0/*exNoCreateBar*/
			oChart:AllowSelectObjects := 0/*exNoSelectObjects*/
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:Bars:Item("Task"):OverlaidType := 4611/*exOverlaidBarsIncludeCaption+exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Member <b>1</b>")
			h := oItems:AddItem("Member <b>Allowed</b>")
			oItems:AddBar(h,"Task","09/21/2006","09/23/2006","T102","Task <b>102</b>")
			oItems:SetProperty("ItemBar",h,"T102",4/*exBarHAlignCaption*/,18)
			oItems:SetProperty("ItemBar",h,"T102",28/*exBarCanMoveToAnother*/,.T.)
			h := oItems:AddItem("Member <b>Allowed</b>")
			h := oItems:AddItem("Member <b>4</b>")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1862
I am using exBarCanMoveToAnother to allow a bar to be moved from one item to another. The question is if it is possible somehow to highlight the current bar can be dropped to (sample 1)

PROCEDURE OnBarParentChange(oG2antt,Item,Key,NewItem,Cancel)
	oG2antt:Items():SetProperty("SelectItem",NewItem,.T.)
	Cancel := oG2antt:ConditionalFormats:Item("NOTRED"):Verify(NewItem)
RETURN

PROCEDURE OnChartEndChanging(oG2antt,Operation)
	oG2antt:SetProperty("SelForeColor",0x8000000e)
	oG2antt:SetProperty("SelBackColor",0x8000000d)
	oG2antt:Chart():SetProperty("SelBackColor",oG2antt:SelBackColor())
	oG2antt:ConditionalFormats():Clear()
RETURN

PROCEDURE OnChartStartChanging(oG2antt,Operation)
	LOCAL oChart
	LOCAL oConditionalFormat,oConditionalFormat1
	oG2antt:SetProperty("SelForeColor",oG2antt:ForeColor())
	oG2antt:SetProperty("SelBackColor",oG2antt:BackColor())
	oChart := oG2antt:Chart()
		oChart:SetProperty("SelBackColor",oChart:BackColor())
	oConditionalFormat := oG2antt:ConditionalFormats():Add("%0 contains `Allowed` ","RED")
		oConditionalFormat:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,128,128 } )  , .F. ))
		oConditionalFormat:SetProperty("ChartBackColor",oConditionalFormat:BackColor())
	oConditionalFormat1 := oG2antt:ConditionalFormats():Add("not ( %0 contains `Allowed` )","NOTRED")
		oConditionalFormat1:Enabled := .F.
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BarParentChange := {|Item,Key,NewItem,Cancel| OnBarParentChange(oG2antt,Item,Key,NewItem,Cancel)} /*Occurs just before moving a bar from current item to another item.*/
		oG2antt:ChartEndChanging := {|Operation| OnChartEndChanging(oG2antt,Operation)} /*Occurs after the chart has been changed.*/
		oG2antt:ChartStartChanging := {|Operation| OnChartStartChanging(oG2antt,Operation)} /*Occurs when the chart is about to be changed.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Members"):SetProperty("Def",17/*exCellValueFormat*/,1)
		oChart := oG2antt:Chart()
			oChart:SetProperty("SelBackColor",oG2antt:SelBackColor())
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:AllowLinkBars := .F.
			oChart:AllowCreateBar := 0/*exNoCreateBar*/
			oChart:AllowSelectObjects := 0/*exNoSelectObjects*/
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:Bars:Item("Task"):OverlaidType := 4611/*exOverlaidBarsIncludeCaption+exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Member <b>1</b>")
			h := oItems:AddItem("Member <b>Allowed</b>")
			oItems:AddBar(h,"Task","09/21/2006","09/23/2006","T102","Task <b>102</b>")
			oItems:SetProperty("ItemBar",h,"T102",4/*exBarHAlignCaption*/,18)
			oItems:SetProperty("ItemBar",h,"T102",28/*exBarCanMoveToAnother*/,.T.)
			h := oItems:AddItem("Member <b>Allowed</b>")
			h := oItems:AddItem("Member <b>4</b>")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1861
How can I check, if a specified item fits a specified conditional format expression
PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Task",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
RETURN

PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	LOCAL h
	h := oG2antt:ItemFromPoint(-1,-1,c,hit)
	DevOut( Transform(oG2antt:ConditionalFormats:Item("RED"):Verify(h),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oConditionalFormat
	LOCAL oConditionalFormats
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/
		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/03/1994"
			oChart:SetProperty("PaneWidth",.F.,256)
			oChart:LevelCount := 2
			oChart:UnitScale := 4096/*exDay*/
			oChart:FirstWeekDay := 1/*exMonday*/
		oG2antt:Chart():SetProperty("SelBackColor",oG2antt:SelBackColor())
		oG2antt:SelBackMode := 1/*exTransparent*/
		oG2antt:ColumnAutoResize := .F.
		oG2antt:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:Items():AllowCellValueToItemBar := .T.
		oG2antt:Columns:Item(2):SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
		oG2antt:Columns:Item(4):SetProperty("Def",18/*exCellValueToItemBarProperty*/,2)
		oConditionalFormats := oG2antt:ConditionalFormats()
			oConditionalFormat := oConditionalFormats:Add("%1 = 5","RED")
				oConditionalFormat:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,128,128 } )  , .F. ))
				oConditionalFormat:SetProperty("ChartBackColor",oConditionalFormat:BackColor())
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1860
Is it possible to apply the conditional format on the items shown on the chart part of the control (sample 3)

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Task",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oConditionalFormat
	LOCAL oConditionalFormats
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oG2antt:SelBackMode := 1/*exTransparent*/
		oChart := oG2antt:Chart()
			oChart:SetProperty("SelBackColor",oG2antt:SelBackColor())
			oChart:FirstVisibleDate := "08/03/1994"
			oChart:SetProperty("PaneWidth",.F.,256)
			oChart:LevelCount := 2
			oChart:UnitScale := 4096/*exDay*/
			oChart:FirstWeekDay := 1/*exMonday*/
		oG2antt:ColumnAutoResize := .F.
		oG2antt:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:Items():AllowCellValueToItemBar := .T.
		oG2antt:Columns:Item(2):SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
		oG2antt:Columns:Item(4):SetProperty("Def",18/*exCellValueToItemBarProperty*/,2)
		oConditionalFormats := oG2antt:ConditionalFormats()
			oConditionalFormat := oConditionalFormats:Add("%1 in (3,5)")
				oConditionalFormat:ApplyToBars := "Task"
				oConditionalFormat:SetProperty("BarColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
				oConditionalFormat:SetProperty("BarOverviewColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
				oConditionalFormat:SetProperty("ForeColor",oConditionalFormat:BarColor())
				oConditionalFormat:Bold := .T.
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1859
Is it possible to apply the conditional format on the items shown on the chart part of the control (sample 2)

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Task",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oConditionalFormat,oConditionalFormat1
	LOCAL oConditionalFormats
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oG2antt:SelBackMode := 1/*exTransparent*/
		oChart := oG2antt:Chart()
			oChart:SetProperty("SelBackColor",oG2antt:SelBackColor())
			oChart:FirstVisibleDate := "08/03/1994"
			oChart:SetProperty("PaneWidth",.F.,256)
			oChart:LevelCount := 2
			oChart:UnitScale := 4096/*exDay*/
			oChart:FirstWeekDay := 1/*exMonday*/
		oG2antt:ColumnAutoResize := .F.
		oG2antt:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:Items():AllowCellValueToItemBar := .T.
		oG2antt:Columns:Item(2):SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
		oG2antt:Columns:Item(4):SetProperty("Def",18/*exCellValueToItemBarProperty*/,2)
		oConditionalFormats := oG2antt:ConditionalFormats()
			oConditionalFormat := oConditionalFormats:Add("%1 in (3,5)")
				oConditionalFormat:ApplyTo := 1/*0x1+*/
				oConditionalFormat:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,128,128 } )  , .F. ))
			oConditionalFormat1 := oConditionalFormats:Add("%1 in (3,5)")
				oConditionalFormat1:ApplyToBars := "Task"
				oConditionalFormat1:SetProperty("BarColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
				oConditionalFormat1:SetProperty("BarOverviewColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
				oConditionalFormat1:SetProperty("ChartBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,128,128 } )  , .F. ))
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1858
Is it possible to apply the conditional format on the items shown on the chart part of the control (sample 1)

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Task",oItems:CellValue(Item,2),oItems:CellValue(Item,4))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oConditionalFormat
	LOCAL oConditionalFormats
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/03/1994"
			oChart:SetProperty("PaneWidth",.F.,256)
			oChart:LevelCount := 2
			oChart:UnitScale := 4096/*exDay*/
			oChart:FirstWeekDay := 1/*exMonday*/
		oG2antt:SelBackMode := 1/*exTransparent*/
		oG2antt:SetProperty("BackColorAlternate",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:ColumnAutoResize := .F.
		oG2antt:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:Chart():SetProperty("SelBackColor",oG2antt:SelBackColor())
		oG2antt:DataSource := rs
		oG2antt:Items():AllowCellValueToItemBar := .T.
		oG2antt:Columns:Item(2):SetProperty("Def",18/*exCellValueToItemBarProperty*/,1)
		oG2antt:Columns:Item(4):SetProperty("Def",18/*exCellValueToItemBarProperty*/,2)
		oConditionalFormats := oG2antt:ConditionalFormats()
			oConditionalFormat := oConditionalFormats:Add("%1 in (3,5)")
				oConditionalFormat:ApplyToBars := "Task"
				oConditionalFormat:SetProperty("BarColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
				oConditionalFormat:SetProperty("BarOverviewColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
				oConditionalFormat:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,128,128 } )  , .F. ))
				oConditionalFormat:SetProperty("ChartBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,128,128 } )  , .F. ))
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1857
How can I get ride / hide the image being dragged by OLE Drag and Drop
PROCEDURE OnOLEStartDrag(oG2antt,Data,AllowedEffects)
	/*Data.SetData("data to drag")*/
	AllowedEffects := 1
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:OLEStartDrag := {|Data,AllowedEffects| OnOLEStartDrag(oG2antt,Data,AllowedEffects)} /*Occurs when the OLEDrag method is called.*/

		oG2antt:OLEDropMode := 1/*exOLEDropManual*/
		oG2antt:SetProperty("Background",34/*exDragDropAfter*/,AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:Columns():Add("Default")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1856
How do I change the visual appearance of the split bars

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oBar,oBar1
	LOCAL oBars
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 24
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:Add(1,"gBFLBCJwBAEHhEJAAEhABEgDg6AADACAxSDEMQBQKAAzQFAYbhgHCGAAGMYhTgmFgAQhFcZQSB0Eg1BKMYwjOJgFgmEQxDQNIBQSLIYQiGSWZBGUBJDjWGgyQjOEByDIMRwjE6UZBgeCRViEMo9RrSEZSLAdGRFAaVYDdULBEACU5VRZQFCwTQcBhpIyoZpkECobh2TYgQjYNT1NSkLxeGoSbbuGhBQrOAw1XTEMhyDR0LTJM6bMBACqrBi2L4xURfOBRXLQAYbHjAZ7rSgacjKRpKRbmAV4Oh+O5pQjadp1TidNwHLoAK7nGwbbgmfwAZrAdjABj1HgBNS2dDkaabQrKEZ4XYAHAXVROOQTWIANb2XC4bwSLAwTJJYzjThiC2GInFOOQckiVw6AeCIvHSBzkCwDxfE6WZ2jsehICadx5kGYZdDgMRrA2c4NmWY56jyGxgEQJIgGkGJHEGVByBkWoCjkNAAAQIQ2AYRoDGQJAoKuZYgBgRZHggHZqAk" +;
		"AZDjYGA7E8KB0kyB5LiiBgigiYhIgiQ4Jk4WIkn6CphjQDgbDmIwDBIMg3GMQ4uDaDZjgiZg6DIY5DGIPg/GQBAMneEJMFkFJqhGTppCYSoSmSSQ2EoPJlAMIhSDmZREAyVYVk0eRkm+FpkmkdhehaTp4iSZQxiYRAODIMQODmJJxhqTwJjYbobmcCZGHKGxLjmVQDC+J4DiYeg8GGWYuH6H5oAoBoCgcTwimaBodmeGZongPRPCoCoOiOZ5qBIIoiAuaZomkPoPGOToEiaaZKHaHYfiUA5OhMAAngoVh6iYKYqHqKoqmGWoGiOKRkHOKJ7D2TxKgaNotmuCpmFAPQrkqPh4iwaw6laOowmwOpwnSL4LmiXJ9D4TxbBqTozm0CxGjwPRtEsIJsjWT4Dlydo1C2Sx2l6N5uAOWpijIDpbhYQ42i4K4mmqOpukuMpnjIJIjmKco5m8S5WnaPZkDuSJ4h0S46FKcY8m+DAHAGPovkoUhgD4cILmsCpCnCTA" +;
		"2nKQgPhwFokh4JpjmsFpEDGDBnBqRpwgwWJ6kSKhZjie5FnGTIXCWR4yAmYh+D+D48g8HpLnMDJHDIPoylObwpWIY5/CyTJzkydw1kSIhzA6ZQ7E+fJrDWUZ0g0JxKksT5NDSPJTmUaRcmAN5Nn0FJ/lMdYNGcWpWnWHRaGAMZ2AQDoEDKNhLicVpViQDYnGqWpPl2HxFDQNwJgoLoGGaCcDInRdjMCuNYbovR2D2FyNgNIcAJC5FWKwNwcBqAzCWBoPgTA8BkEwFwN4HRjjyAMH8EgcQ5CaGIFoAAHQ3AgAAIAQBAQ==")
			oAppearance:Add(2,"gBFLBCJwBAEHhEJAAEhABBYDg6AADACAxSDEMQBQKAAzQFAYbhgHCGAAGMYhTgmFgAQhFcZQSB0Eg1BKMYwjOJgFgmEQxDQNIBQSLIYQiGSWZTgMYRSASI43RoMUIzVAcQxDEaIZLlGQYHgkNIhDJPcZ0VDUbQGBiQIRmIAHNBwJJUVZFdBDLQkQy5HapZDkECobA+CZQTzUUI1LS9WS1HYaRJle4YRDUMJyQjdV4TRINHQvMinYzqOzrOhaW5TSzLcqyCK0SxxR4AJ4yGobJjiQYJShXcxyDQ8dyZC7PQohG7ofxUAKDVjhMjZRQeMS9JCwaThHElRQHMyBdJkKA9Iq2WaGXBeeQ3JbNbzrYzHb5hHZgAzTOoWbzWFT8BJOFOCAYGcJJjHGTh+C2H40AAL5ckyBQDFkKoWHYLw9iGTpGDUY4zkIdwbF8JhbgMc5hF6OJ8C6BhTkOcBAlsR4NnQaAflAIQJBQBoRgwdAdEcIYVEUQJBGYOBCBMYQUGg" +;
		"NhCEKB5FB4VBBgQXJgF+IAzA4Ig5GIQIQBwOxiGiIgngoYpIi4LoKiMA5KDIMwjEKakmk6OJkkmDpNgidgtgwI55AYJw5iQQwSEYNxkgiZJrEITppDSc4TkyCREmeFJkCkAkLmWAwWFoOolkkNheDuJJJDSb4YmIQ4UkaGZlFkVJVhqTR5jYYw7mWeQ1AkPAnEmVh1C6Z4JiYL4KGQYwQmOH5PBoBh2h0EIaAaBg8GMI5Ij6IpokoNoOiOaJDiaEoiA8KgegGIRpGoZoaiaaZDmCdYlGkZAmgmKJqEqFomimaoKCaIoqGqSo2iwQhknqRoyiyaxKlaNotk8OpCjiLprkqbQJD0LALAaQowmwSwWkaMZQhOVpKjKbJLDaTozm0CxFAkPYtEsVpWjWbYLGaWo2lCGRil6N5pAuBpiDsbhLH6Zo3G4ax6HhYgpFibYjCWa4ml4QhPguVp2D4b4Li6bYPmiSZWngPhvGuWQJj+b5zmsBo+iePAmDCIwoGwGJ" +;
		"6kEL4MA8EJDjCC46FWQwoBObwGkQD4UCcDpDg+PIHBWPpiHwYJxD+MgcH8BpH4cBJ7kicIrnKC4hg+fIjCoPoQhyOwuD8M5CnMPpJCMCIIkOOQOlOfw1k6MnJDwPw0GOfhvDGdQNAIKdalOAJfDedJdC8SxCeyNJQleZhdEoJ4iEyLYWlWVx0GQJJslqTQtjcVJYi6aZ8mMM43EmFwCECJkfYyWiDuAuG0EgdBNB8AYHYMgxwEM1EAIAgIA==")
			oAppearance:Add(3,"CP:2 -2 -2 2 2")
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oBars := oChart:Bars()
				oBar := oBars:Add("A")
					oBar:Height := 15
					oBar:SetProperty("Color",0x2000000)
					oBar:Pattern := 6/*exPatternBDiagonal*/
				oBar1 := oBars:Add("Task:A")
					oBar1:Shortcut := "Task"
					oBar1:Height := 15
					oBar1:SetProperty("Color",0x1000000)
					oBar1:SetProperty("Def",20/*exBarKeepWorkingCount*/,.T.)
			oChart:SetProperty("NonworkingDaysColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
			oChart:SetProperty("SelBarColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2001","01/16/2001")
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","01/02/2001","01/16/2001","")
			oItems:SetProperty("ItemBar",h,"",33/*exBarColor*/,65535)
			h := oItems:AddItem("Task 3")
			oItems:AddBar(h,"Task","01/02/2001","01/16/2001","")
			oItems:SetProperty("ItemBar",h,"",257/*exBarSelected*/,.T.)
			h := oItems:AddItem("Task 4")
			oItems:AddBar(h,"Task","01/02/2001","01/16/2001","")
			oItems:SetProperty("ItemBar",h,"",40/*exBarNonWorkingColor*/,58753152)
			h := oItems:AddItem("Task 5")
			oItems:AddBar(h,"Task","01/02/2001","01/16/2001","")
			oItems:SetProperty("ItemBar",h,"",40/*exBarNonWorkingColor*/,25198720)
			h := oItems:AddItem("Task 6")
			oItems:AddBar(h,"Task","01/02/2001","01/16/2001","")
			oItems:SetProperty("ItemBar",h,"",40/*exBarNonWorkingColor*/,2130771712)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1855
Is there a way to display automatically the duration ( days, hours, minutes ) of the bar next to it

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oColumn := oG2antt:Columns():Add("Tasks")
			oColumn:AllowSizing := .F.
			oColumn:Width := 36
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:FirstVisibleDate := "04/06/2009"
			oChart:LevelCount := 2
			oBar := oChart:Bars():Add("Task:Progress")
				oBar:Shortcut := "TaskS"
				oBar:SetProperty("Def",3/*exBarCaption*/,"<%=((1:=int(0:= (%258))) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != 0 ? =:1 + ' hour(s)' : '' ) + (=:1 ? ' ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')%>")
			oChart:ResizeUnitScale := 1048576/*exMinute*/
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("T1"),"TaskS","04/10/2009 02:30:00","04/16/2009 02:30:00")
			oItems:AddBar(oItems:AddItem("T2"),"TaskS","04/14/2009 09:00:00","04/22/2009 10:10:00")
			oItems:SetProperty("ItemBar",0,"<*>",20/*exBarKeepWorkingCount*/,.T.)
			oItems:SetProperty("ItemBar",0,"<*>",4/*exBarHAlignCaption*/,18)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1854
Is there a way to display automatically the duration ( days, hours, minutes ) of the bar next to it

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oColumn := oG2antt:Columns():Add("Tasks")
			oColumn:AllowSizing := .F.
			oColumn:Width := 36
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:FirstVisibleDate := "04/06/2009"
			oChart:LevelCount := 2
			oChart:UnitScale := 65536/*exHour*/
			oChart:ResizeUnitScale := 1048576/*exMinute*/
			oChart:Bars:Item("Task"):SetProperty("Def",3/*exBarCaption*/,"<%=((1:=int(0:= (%513))) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != 0 ? =:1 + ' hour(s)' : '' ) + (=:1 ? ' ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')%>")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("T1"),"Task","04/06/2009 02:30:00","04/06/2009 12:35:00")
			oItems:AddBar(oItems:AddItem("T2"),"Task","04/06/2009 09:00:00","04/06/2009 10:10:00")
			oItems:SetProperty("ItemBar",0,"<*>",4/*exBarHAlignCaption*/,18)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1853
Does it support single or multiple split pane views

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL hSummary,hTask

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oG2antt:SetProperty("Background",18/*exSplitBar*/,AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oG2antt:SetProperty("Background",142/*exCSplitBar*/,AutomationTranslateColor( GraMakeRGBColor  ( { 40,40,40 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,76)
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars:Item("Summary")
				oBar:Pattern := 3/*exPatternShadow*/
				oBar:Shape := 4/*exShapeSolidDown*/
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
				oBar:SetProperty("StartColor",oBar:Color())
				oBar:SetProperty("EndColor",oBar:Color())
			oChart:AllowSplitPane := 3/*exAllowTwoSplitPane+exAllowOneSplitPane*/
			oChart:SplitPaneWidth := "128,128"
		oItems := oG2antt:Items()
			hSummary := oItems:AddItem("Summary")
			oItems:AddBar(hSummary,"Summary","01/02/2001","01/02/2001","")
			hTask := oItems:InsertItem(hSummary,,"Task A")
			oItems:AddBar(hTask,"Task","01/02/2001","01/05/2001","K1")
			hTask := oItems:InsertItem(hSummary,,"Task B")
			oItems:AddBar(hTask,"Task","01/04/2001","01/08/2001","K2")
			hTask := oItems:InsertItem(hSummary,,"Task C")
			oItems:AddBar(hTask,"Task","02/23/2001","02/27/2001","K3")
			oItems:SetProperty("ExpandItem",hSummary,.T.)
			oItems:DefineSummaryBars(hSummary,"",-1,"<*>")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1852
How can I programmatically add more split panes ( by code)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart,oChart1
	LOCAL oItems
	LOCAL hSummary,hTask

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oG2antt:SetProperty("Background",18/*exSplitBar*/,AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,76)
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars:Item("Summary")
				oBar:Pattern := 3/*exPatternShadow*/
				oBar:Shape := 4/*exShapeSolidDown*/
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
				oBar:SetProperty("StartColor",oBar:Color())
				oBar:SetProperty("EndColor",oBar:Color())
			oChart:AllowSplitPane := 1/*exAllowOneSplitPane*/
		oItems := oG2antt:Items()
			hSummary := oItems:AddItem("Summary")
			oItems:AddBar(hSummary,"Summary","01/02/2001","01/02/2001","")
			hTask := oItems:InsertItem(hSummary,,"Task A")
			oItems:AddBar(hTask,"Task","01/02/2001","01/05/2001","K1")
			hTask := oItems:InsertItem(hSummary,,"Task B")
			oItems:AddBar(hTask,"Task","01/04/2001","01/08/2001","K2")
			hTask := oItems:InsertItem(hSummary,,"Task C")
			oItems:AddBar(hTask,"Task","02/23/2001","02/27/2001","K3")
			oItems:SetProperty("ExpandItem",hSummary,.T.)
			oItems:DefineSummaryBars(hSummary,"",-1,"<*>")
		oChart1 := oG2antt:Chart()
			oChart1:ScrollTo(oChart1:EndPrintDate(),1)
			oChart1:SplitPaneWidth := "128,128,128"
			oChart1:ScrollTo(oChart1:StartPrintDate(),1)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1851
How can I programmatically add a split pane, or adding a split view at runtime

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart,oChart1
	LOCAL oItems
	LOCAL hSummary,hTask

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oG2antt:SetProperty("Background",142/*exCSplitBar*/,AutomationTranslateColor( GraMakeRGBColor  ( { 40,40,40 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,76)
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars:Item("Summary")
				oBar:Pattern := 3/*exPatternShadow*/
				oBar:Shape := 4/*exShapeSolidDown*/
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
				oBar:SetProperty("StartColor",oBar:Color())
				oBar:SetProperty("EndColor",oBar:Color())
			oChart:AllowSplitPane := 1/*exAllowOneSplitPane*/
		oItems := oG2antt:Items()
			hSummary := oItems:AddItem("Summary")
			oItems:AddBar(hSummary,"Summary","01/02/2001","01/02/2001","")
			hTask := oItems:InsertItem(hSummary,,"Task A")
			oItems:AddBar(hTask,"Task","01/02/2001","01/05/2001","K1")
			hTask := oItems:InsertItem(hSummary,,"Task B")
			oItems:AddBar(hTask,"Task","01/04/2001","01/08/2001","K2")
			hTask := oItems:InsertItem(hSummary,,"Task C")
			oItems:AddBar(hTask,"Task","02/23/2001","02/27/2001","K3")
			oItems:SetProperty("ExpandItem",hSummary,.T.)
			oItems:DefineSummaryBars(hSummary,"",-1,"<*>")
		oChart1 := oG2antt:Chart()
			oChart1:ScrollTo(oChart1:EndPrintDate(),1)
			oChart1:SplitPaneWidth := "128"
			oChart1:ScrollTo(oChart1:StartPrintDate(),1)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1850
Is there any way, property, procedure or anything else to split the control into multiple views

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL hSummary,hTask

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oG2antt:SetProperty("Background",142/*exCSplitBar*/,AutomationTranslateColor( GraMakeRGBColor  ( { 40,40,40 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,76)
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars:Item("Summary")
				oBar:Pattern := 3/*exPatternShadow*/
				oBar:Shape := 4/*exShapeSolidDown*/
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
				oBar:SetProperty("StartColor",oBar:Color())
				oBar:SetProperty("EndColor",oBar:Color())
			oChart:AllowSplitPane := 1/*exAllowOneSplitPane*/
		oItems := oG2antt:Items()
			hSummary := oItems:AddItem("Summary")
			oItems:AddBar(hSummary,"Summary","01/02/2001","01/02/2001","")
			hTask := oItems:InsertItem(hSummary,,"Task A")
			oItems:AddBar(hTask,"Task","01/02/2001","01/05/2001","K1")
			hTask := oItems:InsertItem(hSummary,,"Task B")
			oItems:AddBar(hTask,"Task","01/04/2001","01/08/2001","K2")
			hTask := oItems:InsertItem(hSummary,,"Task C")
			oItems:AddBar(hTask,"Task","02/23/2001","02/27/2001","K3")
			oItems:SetProperty("ExpandItem",hSummary,.T.)
			oItems:DefineSummaryBars(hSummary,"",-1,"<*>")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1849
It appears that I can not use the ItemFromPoint property in my environment. What else I can do

PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	DevOut( Transform(oG2antt:ExecuteTemplate("Dim c, hit; ItemFromPoint(-1,-1, c, hit )"),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oG2antt:BeginUpdate()
		oColumn := oG2antt:Columns():Add("Default")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1848
How can I change the color for selected links (ebn)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:RenderType := -2
			oAppearance:Add(1,"gBFLBCJwBAEHhEJAEGg4BNkMQAAYAQGKIYBkAKBQAGaAoDDYNQwQwAAwjIKEEwsACEIrjKCVIgkHYJRjGEZxMAsEwjAoaQChEZRUhEMgxDDIIxAJIcaw0GSEZwgOQZBiOEYnDANMgzDLMZR7DajYymSA6LiKNo+QjKFB0NLMVRtEIIIzCSCaNomT4DS4NIi2DYcVhhMqBYbtCZZBo2FpZUxXdL0BJMVxbHKYJikW4pVjoAJ+TxccjVDQNJyLQ6rYzuAAKNpuO58RbdGDQHA9KyfLCEcTxYAMbp6X5kaBZVp2VCMRzbTLUIDzPNVCTrNIaJioAaMeiCG5NUzieqRNalLABFjZMIHDbtGynDIJZruW52+CLIZpWbEOiRXr2TxxgGYp5Fie5mAYBgIgSFDrDOIZUmQZYiECXJUjIEQ3lUGgbEIRQcg+Hg8DEFxYFuOR/i+X5znufh/omBgCgCVwjn4BoBmCCAmAqApgkefgMgOYQID4DoELsUgTgUYYIC4" +;
		"F4GGGSAaBuBxhhgfgggUYgog4EYJGIaBJn6ChiBiLgsgkIpoj4J4BCMSJWDaDZjgiZgCEAQCAgA==")
			oAppearance:Add(2,"CP:1 -2 -2 2 2")
		oG2antt:DefaultItemHeight := 24
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:NonworkingDays := 0
			oChart:LinksStyle := 0/*exLinkSolid*/
			oChart:LinksWidth := 2
			oChart:SetProperty("SelLinkColor",0x20000ff)
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/02/2001","01/04/2001","")
			oItems:AddLink("L1",h1,"",h2,"")
			oItems:SetProperty("Link","L1",257/*exLinkSelected*/,.T.)
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/02/2001","01/04/2001","")
			oItems:AddLink("L2",h2,"",h3,"")
			oItems:SchedulePDM(0,"")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1847
How can I change the color for selected links (color, no frame)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 24
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:NonworkingDays := 0
			oChart:LinksStyle := 0/*exLinkSolid*/
			oChart:LinksWidth := 2
			oChart:SetProperty("SelLinkColor",0x7f0000ff)
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/02/2001","01/04/2001","")
			oItems:AddLink("L1",h1,"",h2,"")
			oItems:SetProperty("Link","L1",257/*exLinkSelected*/,.T.)
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/02/2001","01/04/2001","")
			oItems:AddLink("L2",h2,"",h3,"")
			oItems:SchedulePDM(0,"")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1846
How can I change the color for selected links (color, frame)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 24
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:NonworkingDays := 0
			oChart:LinksStyle := 0/*exLinkSolid*/
			oChart:LinksWidth := 2
			oChart:SetProperty("SelLinkColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/02/2001","01/04/2001","")
			oItems:AddLink("L1",h1,"",h2,"")
			oItems:SetProperty("Link","L1",257/*exLinkSelected*/,.T.)
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/02/2001","01/04/2001","")
			oItems:AddLink("L2",h2,"",h3,"")
			oItems:SchedulePDM(0,"")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1845
By default, the bar gets selected once the user releases the button of the mouse. Is it possible to change this behavior so the bar gets selected once the user presses the button of the mouse
PROCEDURE OnMouseDown(oG2antt,Button,Shift,X,Y)
	LOCAL oItems
	LOCAL b,h
	h := oG2antt:ItemFromPoint(-1,-1,c,hit)
	b := oG2antt:Chart:BarFromPoint(-1,-1)
	oItems := oG2antt:Items()
		oItems:SetProperty("ItemBar",0,"<*>",257/*exBarSelected*/,.F.)
		oItems:SetProperty("ItemBar",h,b,257/*exBarSelected*/,.T.)
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:MouseDown := {|Button,Shift,X,Y| OnMouseDown(oG2antt,Button,Shift,X,Y)} /*Occurs when the user presses a mouse button.*/

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 32
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:Add(1,"gBFLBCJwBAEHhEJAEGg4BNkMQAAYAQGKIYBkAKBQAGaAoDDYNQwQwAAwjIKEEwsACEIrjKCVIgkHYJRjGEZxMAsEwjAoaQChEZRUhEMgxDDIIxAJIcaw0GSEZwgOQZBiOEYnDANMgzDLMZR7DajYymSA6LiKNo+QjKFB0NLMVRtEIIIzCSCaNomT4DS4NIi2DYcVhhMqBYbtCZZBo2FpZUxXdL0BJMVxbHKYJikW4pVjoAJ+TxccjVDQNJyLQ6rYzuAAKNpuO58RbdGDQHA9KyfLCEcTxYAMbp6X5kaBZVp2VCMRzbTLUIDzPNVCTrNIaJioAaMeiCG5NUzieqRNalLABFjZMIHDbtGynDIJZruW52+CLIZpWbEOiRXr2TxxgGYp5Fie5mAYBgIgSFDrDOIZUmQZYiECXJUjIEQ3lUGgbEIRQcg+Hg8DEFxYFuOR/i+X5znufh/omBgCgCVwjn4BoBmCCAmAqApgkefgMgOYQID4DoELsUgTgUYYIC4" +;
		"F4GGGSAaBuBxhhgfgggUYgog4EYJGIaBJn6ChiBiLgsgkIpoj4J4BCMSJWDaDZjgiZgCEAQCAgA==")
			oAppearance:Add(2,"CP:1 -2 -2 2 2")
		oChart := oG2antt:Chart()
			oChart:AllowSelectObjects := 0/*exNoSelectObjects*/
			oChart:FirstVisibleDate := "01/01/2002"
			oChart:SetProperty("SelBarColor",0x2000000)
			oChart:SetProperty("PaneWidth",.F.,48)
		oG2antt:Columns():Add("Task")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task")
			oItems:AddBar(h,"Task","01/02/2002","01/04/2002","A")
			oItems:AddBar(h,"Task","01/06/2002","01/10/2002","B")
			oItems:AddBar(h,"Task","01/11/2002","01/14/2002","C")
			oItems:SetProperty("ItemBar",h,"B",257/*exBarSelected*/,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1844
How can I change the bar's color (sample 3, ebn, individual, global)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oBar,oBar1
	LOCAL oChart
	LOCAL oItems
	LOCAL hSummaryJ,hSummaryK,hTaskJ,hTaskK

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:RenderType := -2
			oAppearance:Add(1,"gBFLBCJwBAEHhEJAAEhABN0GACAADACAxRDAMgBQKAAzQFAYahuGSGAAGMYxQgmFgAQhFcZQSKUOQTDKMIziYBYJhEMQyDAAUIjOKsIhkGYcZAGQBJCjWGodQLOEgwHIERQjEyUJAGGQIHhyPYbUbGUpQHKkeRtGqgBgoKhKEouNYgAbGYIwTRsdyfDSXBpEWwbDgkNQwWTDNoRDIUQStCysaYjOpnfrUAJ1P7FdQ1NJkXRhGSSK7maapaiCSZ6STCMj1FhVKSNJ7DQKhGpgKh/ApgYpQOK4fLNXyRBK4QAyKA6bgPFZOZbFViaXY1V5bNKrcjhHQwAyHJ4XXRdV4YRAkUT4GqiJKGSYcQhuXZWbRqO6ABhef6DRThc6jKpFHIE4llEcojHqSZNgoIxnlgd5thsLREleL43gsYZ9BkaAYkMAgAm+CxGDWWAtiKCRfjcdRgHoHYnicUwgAIEIREAaQYkcQZUHIGRUDQJBOEYRAhDYCxGgMZAkCgdYQha" +;
		"XQIAYERwQuahXggdgeG6VZ4H4IhdiIGIOB8YIiGiHZZgqYpGF4KYHiKCI+CAU5jCiTQ2g0YhEFyax4gABAEIC")
			oAppearance:Add(2,"gBFLBCJwBAEHhEJAAEhABU0IQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRhGcTAJBMIhiGQYAChEZxVhEMgzDjIAxSJAcQRFESaAABGCQGh+N4/S4NIi0CIsZQjCaiZ7pKA5bgMCo+UrNMixZQVCSOGChYRpCaZWpGGodQRUFbVHAlKypJKCKrEWSrDhuYAAW7XM7yBS1TzVNSuLZtaLqSroAJ1WTWMB0Ra8NzZEKfaZACj4arKejrRDCMAggI=")
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars:Item("Task")
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18)
				oBar:SetProperty("Color",0x1000000)
			oBar1 := oChart:Bars:Item("Summary")
				oBar1:SetProperty("Def",4/*exBarHAlignCaption*/,18)
				oBar1:SetProperty("Color",0x2000000)
		oItems := oG2antt:Items()
			hSummaryJ := oItems:AddItem("Summary A")
			oItems:AddBar(hSummaryJ,"Summary","01/02/2001","01/02/2001","J")
			hTaskJ := oItems:InsertItem(hSummaryJ,,"Task A.1")
			oItems:AddBar(hTaskJ,"Task","01/02/2001","01/05/2001","J1")
			hTaskJ := oItems:InsertItem(hSummaryJ,,"Task A.2")
			oItems:AddBar(hTaskJ,"Task","01/04/2001","01/08/2001","J2")
			oItems:DefineSummaryBars(hSummaryJ,"J",-1,"<*>")
			hSummaryK := oItems:AddItem("Summary B")
			oItems:AddBar(hSummaryK,"Summary","01/02/2001","01/02/2001","K")
			hTaskK := oItems:InsertItem(hSummaryK,,"Task B.1")
			oItems:AddBar(hTaskK,"Task","01/02/2001","01/05/2001","K1")
			hTaskK := oItems:InsertItem(hSummaryK,,"Task B.2")
			oItems:AddBar(hTaskK,"Task","01/04/2001","01/08/2001","K2")
			oItems:DefineSummaryBars(hSummaryK,"K",-1,"<*>")
			oItems:SetProperty("ItemBar",0,"<K*>",33/*exBarColor*/,255)
			oItems:SetProperty("ExpandItem",0,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1843
How can I change the bar's color (sample 2, global)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar,oBar1
	LOCAL oChart
	LOCAL oItems
	LOCAL hSummaryJ,hSummaryK,hTaskJ,hTaskK

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars:Item("Task")
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18)
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oBar1 := oChart:Bars:Item("Summary")
				oBar1:SetProperty("Def",4/*exBarHAlignCaption*/,18)
				oBar1:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
				oBar1:SetProperty("StartColor",oBar1:Color())
				oBar1:SetProperty("EndColor",oBar1:Color())
		oItems := oG2antt:Items()
			hSummaryJ := oItems:AddItem("Summary A")
			oItems:AddBar(hSummaryJ,"Summary","01/02/2001","01/02/2001","J")
			hTaskJ := oItems:InsertItem(hSummaryJ,,"Task A.1")
			oItems:AddBar(hTaskJ,"Task","01/02/2001","01/05/2001","J1")
			hTaskJ := oItems:InsertItem(hSummaryJ,,"Task A.2")
			oItems:AddBar(hTaskJ,"Task","01/04/2001","01/08/2001","J2")
			oItems:DefineSummaryBars(hSummaryJ,"J",-1,"<*>")
			hSummaryK := oItems:AddItem("Summary B")
			oItems:AddBar(hSummaryK,"Summary","01/02/2001","01/02/2001","K")
			hTaskK := oItems:InsertItem(hSummaryK,,"Task B.1")
			oItems:AddBar(hTaskK,"Task","01/02/2001","01/05/2001","K1")
			hTaskK := oItems:InsertItem(hSummaryK,,"Task B.2")
			oItems:AddBar(hTaskK,"Task","01/04/2001","01/08/2001","K2")
			oItems:DefineSummaryBars(hSummaryK,"K",-1,"<*>")
			oItems:SetProperty("ExpandItem",0,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1842
How can I change the bar's color (sample 1, individual)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL hSummaryJ,hSummaryK,hTaskJ,hTaskK

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:Bars:Item("Task"):SetProperty("Def",4/*exBarHAlignCaption*/,18)
			oChart:Bars:Item("Summary"):SetProperty("Def",4/*exBarHAlignCaption*/,18)
		oItems := oG2antt:Items()
			hSummaryJ := oItems:AddItem("Summary A")
			oItems:AddBar(hSummaryJ,"Summary","01/02/2001","01/02/2001","J","  (default)")
			hTaskJ := oItems:InsertItem(hSummaryJ,,"Task A.1")
			oItems:AddBar(hTaskJ,"Task","01/02/2001","01/05/2001","J1","(default)")
			hTaskJ := oItems:InsertItem(hSummaryJ,,"Task A.2")
			oItems:AddBar(hTaskJ,"Task","01/04/2001","01/08/2001","J2","(default)")
			oItems:DefineSummaryBars(hSummaryJ,"J",-1,"<*>")
			hSummaryK := oItems:AddItem("Summary B")
			oItems:AddBar(hSummaryK,"Summary","01/02/2001","01/02/2001","K")
			hTaskK := oItems:InsertItem(hSummaryK,,"Task B.1")
			oItems:AddBar(hTaskK,"Task","01/02/2001","01/05/2001","K1")
			hTaskK := oItems:InsertItem(hSummaryK,,"Task B.2")
			oItems:AddBar(hTaskK,"Task","01/04/2001","01/08/2001","K2")
			oItems:DefineSummaryBars(hSummaryK,"K",-1,"<*>")
			oItems:SetProperty("ItemBar",hSummaryK,"",33/*exBarColor*/,255)
			oItems:SetProperty("ItemBar",0,"<K*>",33/*exBarColor*/,255)
			oItems:SetProperty("ExpandItem",0,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1841
How do I make the control read-only (method 2)

PROCEDURE OnEdit(oG2antt,Item,ColIndex,Cancel)
	Cancel := .T.
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oEditor,oEditor1
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Edit := {|Item,ColIndex,Cancel| OnEdit(oG2antt,Item,ColIndex,Cancel)} /*Occurs just before editing the focused cell.*/

		oG2antt:BeginUpdate()
		oEditor := oG2antt:Columns():Add("Editor"):Editor()
			oEditor:EditType := 6/*CheckListType*/
			oEditor:AddItem(1,"One")
			oEditor:AddItem(2,"Two")
		oColumn := oG2antt:Columns():Add("Check")
			oEditor1 := oColumn:Editor()
				oEditor1:EditType := 19/*CheckValueType*/
				oEditor1:SetProperty("Option",16/*exCheckValue1*/,2)
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem(1),1,0)
			oItems:SetProperty("CellValue",oItems:AddItem(2),1,1)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1840
How do I make the control read-only (method 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oEditor,oEditor1
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ReadOnly := -1/*exReadOnly*/
		oEditor := oG2antt:Columns():Add("Editor"):Editor()
			oEditor:EditType := 6/*CheckListType*/
			oEditor:AddItem(1,"One")
			oEditor:AddItem(2,"Two")
		oColumn := oG2antt:Columns():Add("Check")
			oEditor1 := oColumn:Editor()
				oEditor1:EditType := 19/*CheckValueType*/
				oEditor1:SetProperty("Option",16/*exCheckValue1*/,2)
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem(1),1,0)
			oItems:SetProperty("CellValue",oItems:AddItem(2),1,1)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1839
The ReadOnly property does not prevent changing the column's check-box (sample 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ShowFocusRect := .F.
		oColumn := oG2antt:Columns():Add("C1")
			oColumn:AllowSizing := .F.
			oColumn:Width := 18
			oColumn:Editor():EditType := 19/*CheckValueType*/
		oG2antt:Columns():Add("C2")
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem(0),1,"Item 1")
			oItems:SetProperty("CellValue",oItems:AddItem(-1),1,"Item 2")
			oItems:SetProperty("CellValue",oItems:AddItem(0),1,"Item 3")
		oG2antt:ReadOnly := -1/*exReadOnly*/
		oG2antt:Columns:Item(0):Editor():SetProperty("Option",17/*exCheckValue2*/,2)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1838
The ReadOnly property does not prevent changing the column's check-box (sample 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oEditor
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ShowFocusRect := .F.
		oColumn := oG2antt:Columns():Add("C1")
			oColumn:AllowSizing := .F.
			oColumn:Width := 18
			oEditor := oColumn:Editor()
				oEditor:EditType := 19/*CheckValueType*/
				oEditor:SetProperty("Option",17/*exCheckValue2*/,1)
		oG2antt:Columns():Add("C2")
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem(0),1,"Item 1")
			oItems:SetProperty("CellValue",oItems:AddItem(-1),1,"Item 2")
			oItems:SetProperty("CellValue",oItems:AddItem(0),1,"Item 3")
		oG2antt:ReadOnly := -1/*exReadOnly*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1837
How can I change the visual appearance of the control's split bar (sample 3)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Default")
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:Add(1,"gBFLBCJwBAEHhEJAAEhABPsIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRrGUQxCKIZhzEgYRokAYYRDIMg5SBIETzFIMCQ9AaaJpieRJGiiKoJSxHErgFD8QxzEKOZqnCapViAMpOAZQAwDAIoWhpKKBRhqOpRUhaID/WAAFCUZK4ASTDCyLRgNy4lACgI")
			oAppearance:Add(2,"gBFLBCJwBAEHhEJAAEhABPkIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRrGUQxCKIZhzEgYRoiEYhXDiIAxARHcgyBIMPQJGSaZpkSRpIiqHItS6BM4RVKkcw7G6BaJnGJpADKTQGQiMIwDAIoWhpKCBaiqSpqMglf5fg6pOJqHACZZKWLNLpxDBMAkBA=")
			oAppearance:Add(3,"gBFLBCJwBAEHhEJAAEhABUUIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRrGQCwTCIYhmHKSRhGSIRSDcOIgDCBEbyDIEQw9AiZZqmaRZHimK4cS5MEhwHKsLSLGyOZwoSapbgmJooU5KUwSYKQcxBI6laYpIAKJhiWobTxUEBwMKlJw5KoBJxjKqIbp2XZsUxIAxXEA1HBgGASRZGS5bDreeQ0UZCL74GAFUy/Liba6weqnLhGCYBgIA==")
		oG2antt:SetProperty("Background",18/*exSplitBar*/,0x1808080)
		oG2antt:SetProperty("Background",141/*exHSplitBar*/,0x2808080)
		oG2antt:SetProperty("Background",142/*exCSplitBar*/,0x3010101)
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:HistogramVisible := .T.
			oChart:HistogramHeight := 64
			oChart:OverviewHeight := 48
			oChart:OverviewVisible := -1/*exOverviewShowAll*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1836
How can I change the color for the control's split bar (sample 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Default")
		oG2antt:SetProperty("Background",18/*exSplitBar*/,AutomationTranslateColor( GraMakeRGBColor  ( { 190,190,190 } )  , .F. ))
		oG2antt:SetProperty("Background",141/*exHSplitBar*/,AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oG2antt:SetProperty("Background",142/*exCSplitBar*/,AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,1 } )  , .F. ))
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:HistogramVisible := .T.
			oChart:HistogramHeight := 64
			oChart:OverviewHeight := 48
			oChart:OverviewVisible := -1/*exOverviewShowAll*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1835
How do I highlight a bar with an icon, exclamation mark or some warning sign, without using exBarCaption, exBarExtraCaption which I've already use for something else ( sample 2 )

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL oNote
	LOCAL oNotes
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/26/2000"
			oChart:SetProperty("PaneWidth",.F.,128)
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddItem("")
			h := oItems:AddItem("Item")
			oItems:AddItem("")
			oItems:AddBar(h,"Task","01/01/2001","01/13/2001","A")
		oNotes := oG2antt:Chart():Notes()
			oNote := oNotes:Add("Attention",oG2antt:Items:ItemByIndex(1),"A"," <font ;11>! ")
				oNote:RelativePosition := 0.5
				oNote:ShowLink := 0/*exNoteLinkHidden*/
				oNote:SetProperty("PartVOffset",1/*exNoteEnd*/,0)
				oNote:SetProperty("PartShadow",1/*exNoteEnd*/,.F.)
				oNote:SetProperty("PartBackColor",1/*exNoteEnd*/,AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,0 } )  , .F. ))
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1834
How do I highlight a bar with an icon, exclamation mark or some warning sign, without using exBarCaption, exBarExtraCaption which I've already use for something else ( sample 1 )

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/26/2000"
			oChart:SetProperty("PaneWidth",.F.,128)
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddItem("")
			h := oItems:AddItem("Item")
			oItems:AddItem("")
			oItems:AddBar(h,"Task","01/01/2001","01/13/2001","A")
			oItems:SetProperty("ItemBar",h,"A",53/*exBarBackgroundExt*/,"[text=`<bgcolor=FFFF00><font ;11> ! `,align=0x11]")
			oItems:SetProperty("ItemBar",h,"A",55/*exBarBackgroundExtInflate*/,8)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1833
How do I get the "Summary" bar being shown in the control's histogram (sample 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL hSummary,hTask

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oG2antt:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAAEhABU0IQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRhGcTAJBMIhiGQYAChEZxVhEMgzDjIAxSJAcQRFESaAABGCQGh+N4/S4NIi0CIsZQjCaiZ7pKA5bgMCo+UrNMixZQVCSOGChYRpCaZWpGGodQRUFbVHAlKypJKCKrEWSrDhuYAAW7XM7yBS1TzVNSuLZtaLqSroAJ1WTWMB0Ra8NzZEKfaZACj4arKejrRDCMAggI=")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:HistogramVisible := .T.
			oChart:HistogramHeight := 64
			oChart:HistogramView := 1136/*exHistogramNoGrouping+exHistogramAllItems*/
			oBar := oChart:Bars:Item("Task")
				oBar:HistogramPattern := oBar:Pattern()
				oBar:HistogramType := 256/*exHistCumulative*/
				oBar:HistogramCumulativeOriginalColorBars := 1/*exKeepOriginalColor*/
		oItems := oG2antt:Items()
			hSummary := oItems:AddItem("Summary")
			oItems:AddBar(hSummary,"Task","01/02/2001","01/02/2001","")
			oItems:SetProperty("ItemBar",hSummary,"",33/*exBarColor*/,16777216)
			hTask := oItems:InsertItem(hSummary,,"Task A")
			oItems:AddBar(hTask,"Task","01/02/2001","01/05/2001","K1")
			hTask := oItems:InsertItem(hSummary,,"Task B")
			oItems:AddBar(hTask,"Task","01/04/2001","01/08/2001","K2")
			hTask := oItems:InsertItem(hSummary,,"Task C")
			oItems:AddBar(hTask,"Task","01/12/2001","01/17/2001","K3")
			oItems:SetProperty("ExpandItem",hSummary,.T.)
			oItems:DefineSummaryBars(hSummary,"",-1,"<*>")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1832
How do I get the "Summary" bar being shown in the control's histogram (sample 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar,oBar1
	LOCAL oChart
	LOCAL oItems
	LOCAL hSummary,hTask

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAAEhABU0IQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRhGcTAJBMIhiGQYAChEZxVhEMgzDjIAxSJAcQRFESaAABGCQGh+N4/S4NIi0CIsZQjCaiZ7pKA5bgMCo+UrNMixZQVCSOGChYRpCaZWpGGodQRUFbVHAlKypJKCKrEWSrDhuYAAW7XM7yBS1TzVNSuLZtaLqSroAJ1WTWMB0Ra8NzZEKfaZACj4arKejrRDCMAggI=")
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:HistogramVisible := .T.
			oChart:HistogramHeight := 64
			oChart:HistogramView := 1136/*exHistogramNoGrouping+exHistogramAllItems*/
			oBar := oChart:Bars:Item("Task")
				oBar:HistogramPattern := oBar:Pattern()
			oBar1 := oChart:Bars:Item("Summary")
				oBar1:SetProperty("Color",0x1000000)
				oBar1:SetProperty("HistogramColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,1 } )  , .F. ))
				oBar1:HistogramPattern := 6/*exPatternBDiagonal*/
		oItems := oG2antt:Items()
			hSummary := oItems:AddItem("Summary")
			oItems:AddBar(hSummary,"Summary","01/02/2001","01/02/2001","")
			hTask := oItems:InsertItem(hSummary,,"Task A")
			oItems:AddBar(hTask,"Task","01/02/2001","01/05/2001","K1")
			hTask := oItems:InsertItem(hSummary,,"Task B")
			oItems:AddBar(hTask,"Task","01/04/2001","01/08/2001","K2")
			hTask := oItems:InsertItem(hSummary,,"Task C")
			oItems:AddBar(hTask,"Task","01/12/2001","01/17/2001","K3")
			oItems:SetProperty("ExpandItem",hSummary,.T.)
			oItems:DefineSummaryBars(hSummary,"",-1,"<*>")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1831
How can I temporarily/programmatically hide the control's tooltip

PROCEDURE OnRClick(oG2antt)
	LOCAL nToolTipDelay
	nToolTipDelay := oG2antt:ToolTipDelay()
	oG2antt:ToolTipDelay := 0
	oG2antt:ToolTipDelay := nToolTipDelay
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:RClick := {|| OnRClick(oG2antt)} /*Fired when right mouse button is clicked*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Column w/h tooltip..."):ToolTip := "This is a bit of text that's shown when the cursor hovers the column.<br><br><sha ;;0><c>Right-Click to hide it</sha>"
		oChart := oG2antt:Chart()
			oChart:FirstWeekDay := oChart:LocFirstWeekDay()
			oChart:MonthNames := oChart:LocMonthNames()
			oChart:WeekDays := oChart:LocWeekDays()
			oChart:AMPM := oChart:LocAMPM()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:UnitScale := 4096/*exDay*/
		oG2antt:HeaderAppearance := 1/*Flat*/
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1830
Is it possible to find out the handle of the item, giving the key of the bar only

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Debug := .T.
		oG2antt:DefaultItemHeight := 32
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:Bars:Item("Task"):Height := 16
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:ShowLinks := 1/*exShowExtendedLinks*/
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2001","01/04/2001","K1")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/05/2001","01/07/2001","K2")
			oItems:SetProperty("ItemBold",oItems:ItemBar(0,"K2",512/*exBarParent*/),.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1829
How can I programmatically add a link between two bars, knowing the keys of these bars only

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Debug := .T.
		oG2antt:DefaultItemHeight := 32
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:Bars:Item("Task"):Height := 16
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:ShowLinks := 1/*exShowExtendedLinks*/
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/05/2001","01/07/2001","AK2")
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/05/2001","01/07/2001","AK3")
			oItems:AddLink("Link1",0,"K1",0,"AK2")
			oItems:AddLink("Link2",0,"K1",0,"<A?3>")
			oItems:AddLink("Link3",0,"<*2>",0,"AK3")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1828
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 3)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:DrawGridLines := -2/*exRowLines*/
		oG2antt:AutoDrag := 3/*exAutoDragPositionAny*/
		oG2antt:HasLines := 1/*exSolidLine*/
		oG2antt:Indent := 16
		oG2antt:MarkSearchColumn := .F.
		oColumns := oG2antt:Columns()
			oColumn := oColumns:Add("")
				oColumn:SetProperty("Def",17/*exCellValueFormat*/,1)
				oColumn:FormatColumn := "((1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 + `` :  (=:0 mid (1 + 1 + =:1) )  + `)` ) + ` ` + value"
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child")
			hChild := oItems:InsertItem(h,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(h,,"Child")
			oItems:SetProperty("ExpandItem",0,.T.)
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child")
			hChild := oItems:InsertItem(h,,"Child")
			oItems:SetProperty("CellState",hChild,0,1)
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(h,,"Child")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1827
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:SetProperty("GridLineColor",AutomationTranslateColor( GraMakeRGBColor  ( { 190,190,190 } )  , .F. ))
		oG2antt:DrawGridLines := -2/*exRowLines*/
		oG2antt:AutoDrag := 3/*exAutoDragPositionAny*/
		oG2antt:HasLines := 1/*exSolidLine*/
		oG2antt:Indent := 16
		oColumns := oG2antt:Columns()
			oColumns:Add("Default")
			oColumn := oColumns:Add("")
				oColumn:SetProperty("Def",17/*exCellValueFormat*/,1)
				oColumn:SetProperty("Def",49/*exCellPaddingRight*/,4)
				oColumn:AllowSizing := .F.
				oColumn:Width := 36
				oColumn:Position := 0
				oColumn:FormatColumn := "(1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 : (`............` left 2 * (=:0 count `.`)) + (=:0 mid (1 + 1 + =:1) ) "
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child")
			hChild := oItems:InsertItem(h,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(h,,"Child")
			oItems:SetProperty("ExpandItem",0,.T.)
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child")
			hChild := oItems:InsertItem(h,,"Child")
			oItems:SetProperty("CellState",hChild,0,1)
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(h,,"Child")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1826
I'm trying to use automatic numbering of the outline. How can I have A, B, C for root items, 1, 2, 3 for the sub-items, and a, b, c for sub-sub-items (sample 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:DrawGridLines := -2/*exRowLines*/
		oG2antt:AutoDrag := 3/*exAutoDragPositionAny*/
		oG2antt:HasLines := 1/*exSolidLine*/
		oG2antt:Indent := 16
		oColumns := oG2antt:Columns()
			oColumns:Add("Default")
			oColumn := oColumns:Add("")
				oColumn:SetProperty("Def",17/*exCellValueFormat*/,1)
				oColumn:SetProperty("Def",49/*exCellPaddingRight*/,4)
				oColumn:Alignment := 2/*RightAlignment*/
				oColumn:AllowSizing := .F.
				oColumn:Width := 24
				oColumn:Position := 0
				oColumn:FormatColumn := "(1:=(0 :=(1 rpos '.|A-Z||a-z|')) rfind `.`) < 0 ? `<b>` + =:0 : `<i>` + (=:0 mid (1 + 1 + =:1) ) "
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child")
			hChild := oItems:InsertItem(h,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(h,,"Child")
			oItems:SetProperty("ExpandItem",0,.T.)
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child")
			hChild := oItems:InsertItem(h,,"Child")
			oItems:SetProperty("CellState",hChild,0,1)
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(hChild,,"Child")
			oItems:InsertItem(h,,"Child")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1825
How can I programmatically group by columns, without having the control's sort bar visible

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:ColumnAutoResize := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:SortBarHeight := 0
		oG2antt:SortBarVisible := .T.
		oG2antt:SortBarCaption := "Drag a <b>column</b> header here to group by that column."
		oG2antt:AllowGroupBy := .T.
		oG2antt:Layout := "multiplesort=" + CHR(34) + "C1:2" + CHR(34) + ""
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1824
How do I perform my own sort

PROCEDURE OnSort(oG2antt)
	LOCAL oItems
	DevOut( "Sort" )
	oItems := oG2antt:Items()
		oItems:SetProperty("ItemPosition",oItems:ItemByIndex(1),0)
		oItems:SetProperty("ItemPosition",oItems:ItemByIndex(0),1)
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumns
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Sort := {|| OnSort(oG2antt)} /*Fired when the control sorts a column.*/

		oG2antt:BeginUpdate()
		oG2antt:SingleSort := .F.
		oG2antt:SortOnClick := 1/*exUserSort*/
		oColumns := oG2antt:Columns()
			oColumns:Add("Index"):FormatColumn := "0 index ``"
			oColumns:Add("Data 1")
			oColumns:Add("Data 2")
		oItems := oG2antt:Items()
			h := oItems:AddItem(0)
			oItems:SetProperty("CellValue",h,1,2)
			oItems:SetProperty("CellValue",h,2,3)
			h := oItems:AddItem(4)
			oItems:SetProperty("CellValue",h,1,5)
			oItems:SetProperty("CellValue",h,2,6)
			h := oItems:AddItem(7)
			oItems:SetProperty("CellValue",h,1,8)
			oItems:SetProperty("CellValue",h,2,9)
		oG2antt:Layout := "multiplesort=" + CHR(34) + "C1:1 C2:2" + CHR(34) + ""
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1823
Is it possible to have a different alignment for parts of the cell's caption

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,.T.)
		oG2antt:TreeColumnIndex := -1
		oG2antt:DrawGridLines := -2/*exRowLines*/
		oColumn := oG2antt:Columns():Add("Default")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
		oItems := oG2antt:Items()
			oItems:SetProperty("CellHAlignment",oItems:AddItem("all-left"),0,0/*LeftAlignment*/)
			oItems:SetProperty("CellHAlignment",oItems:AddItem("all-center"),0,1/*CenterAlignment*/)
			oItems:SetProperty("CellHAlignment",oItems:AddItem("all-right"),0,2/*RightAlignment*/)
			h := oItems:AddItem("left<c>center<r>right")
			oItems:SetProperty("CellValueFormat",h,0,1/*exHTML*/)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1822
I have a column with Def(exCellSingleLine) property on False, word-wrapping, and I am wondering if possible to update the column's content while user is resizing it
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oColumns := oG2antt:Columns()
			oColumn := oColumns:Add("MultipleLine")
				oColumn:Width := 32
				oColumn:SetProperty("Def",16/*exCellSingleLine*/,.F.)
				oColumn:SetProperty("Def",64/*exColumnResizeContiguously*/,.T.)
			oColumn1 := oColumns:Add("SingleLine")
				oColumn1:SetProperty("Def",16/*exCellSingleLine*/,.F.)
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem("This is a bit of long text that should break the line"),1,"This is a bit of long text that should break the line")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1821
Is there an other way to detect if a bar is overlapping any other bar

PROCEDURE OnBarResizing(oG2antt,Item,Key)
	oG2antt:Refresh()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar,oBar1
	LOCAL oChart
	LOCAL oColumn,oColumn1
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BarResizing := {|Item,Key| OnBarResizing(oG2antt,Item,Key)} /*Occurs when a bar is moving or resizing.*/

		oG2antt:BeginUpdate()
		oG2antt:DrawGridLines := 2/*exVLines*/
		oG2antt:HeaderAppearance := 4/*Etched*/
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oG2antt:DefaultItemHeight := 22
		oG2antt:Columns():Add("Task")
		oColumn := oG2antt:Columns():Add("Intersect / Count")
			oColumn:SetProperty("Def",19/*exCellValueToItemBarKey*/,"A")
			oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,521)
			oColumn:LevelKey := 1
		oColumn1 := oG2antt:Columns():Add(" / With")
			oColumn1:SetProperty("Def",19/*exCellValueToItemBarKey*/,"A")
			oColumn1:SetProperty("Def",18/*exCellValueToItemBarProperty*/,520)
			oColumn1:LevelKey := 1
		oG2antt:Items():AllowCellValueToItemBar := .T.
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,148)
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars:Item("Task")
				oBar:OverlaidType := 1/*exOverlaidBarsOffset*/
				oBar:OverlaidGroup := "TaskB"
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,16)
			oBar1 := oChart:Bars():Add("TaskB")
				oBar1:Pattern := 6/*exPatternBDiagonal*/
				oBar1:SetProperty("Def",4/*exBarHAlignCaption*/,18)
		oItems := oG2antt:Items()
			h := oItems:AddItem("A")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","A","A")
			oItems:AddBar(h,"TaskB","01/03/2001","01/05/2001","B","B")
			h := oItems:AddItem("A")
			oItems:AddBar(h,"Task","01/06/2001","01/09/2001","A","A")
			oItems:AddBar(h,"TaskB","01/10/2001","01/13/2001","B","B")
			h := oItems:AddItem("A")
			oItems:AddBar(h,"TaskB","01/06/2001","01/09/2001","B1","B1")
			oItems:AddBar(h,"Task","01/10/2001","01/13/2001","A","A")
			oItems:AddBar(h,"TaskB","01/10/2001","01/13/2001","B2","B2")
			h := oItems:AddItem("A")
			oItems:AddBar(h,"Task","01/08/2001","01/11/2001","B1","B1")
			oItems:AddBar(h,"Task","01/10/2001","01/13/2001","A","A")
			oItems:AddBar(h,"Task","01/12/2001","01/15/2001","B2","B2")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1820
How can I get the absolute position of an item
PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Task","01/02/2017","01/05/2017")
RETURN

PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	LOCAL oItems
	oItems := oG2antt:Items()
		DevOut( oItems:CellCaption(oG2antt:ItemFromPoint(-1,-1,c,hit),"Position") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/
		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2017"
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oG2antt:SetProperty("BackColorAlternate",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:Columns():Add("Def"):DisplayFilterButton := .T.
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(oItems:InsertItem(h,,"Child 1"),,"Sub-Child 1")
			oItems:InsertItem(oItems:InsertItem(h,,"Child 2"),,"Sub-Child 2")
		oG2antt:PutItems(oG2antt:GetItems(-1))
		oG2antt:PutItems(oG2antt:GetItems(-1))
		oG2antt:PutItems(oG2antt:GetItems(-1))
		oColumn := oG2antt:Columns():Add("Position")
			oColumn:FormatColumn := "1 apos ``"
			oColumn:Visible := .F.
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1819
How do I sort the index column as numeric (Method 2)

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:SetProperty("CellData",Item,1,oItems:CellCaption(Item,1))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oG2antt:DrawGridLines := -1/*exAllLines*/
		oG2antt:ColumnAutoResize := .T.
		oG2antt:ShowFocusRect := .F.
		oColumn := oG2antt:Columns():Add("Next")
			oColumn:SetProperty("Def",48/*exCellPaddingLeft*/,4)
			oColumn:SetProperty("Def",52/*exHeaderPaddingLeft*/,4)
		oColumn1 := oG2antt:Columns():Add("Index")
			oColumn1:AllowSizing := .F.
			oColumn1:Width := 48
			oColumn1:FormatColumn := "(((0 := (1 index ``)) mod 3) case ( default: ``; 0 : `<r><fgcolor=B0B0B0>`; 1: ``; 2 : `<c><fgcolor=808080>` )) + str(=:0)"
			oColumn1:SetProperty("Def",17/*exCellValueFormat*/,1)
			oColumn1:SortType := 5/*SortUserData*/
			oColumn1:Position := 0
		oItems := oG2antt:Items()
			oItems:AddItem("Item 1")
			oItems:AddItem("Item 2")
			oItems:AddItem("Item 3")
			oItems:AddItem("Item 4")
			oItems:AddItem("Item 5")
			oItems:AddItem("Item 6")
			oItems:AddItem("Item 7")
			oItems:AddItem("Item 8")
			oItems:AddItem("Item 9")
			oItems:AddItem("Item 10")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1818
How do I sort the index column as numeric (Method 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oColumn := oG2antt:Columns():Add("Sort Index As String (Default)")
			oColumn:FormatColumn := "1 index ``"
		oColumn1 := oG2antt:Columns():Add("Sort Index As Numeric")
			oColumn1:ComputedField := "%C0"
			oColumn1:SortType := 1/*SortNumeric*/
		oItems := oG2antt:Items()
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1817
How can I put icons/images into buttons

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ColumnAutoResize := .T.
		oG2antt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oColumn := oG2antt:Columns():Add("C+B")
			oColumn:AllowSizing := .F.
			oColumn:Width := 48
			oColumn:FormatColumn := "` <img>` + ( 1 + (1 index ``) mod 3 ) + `</img> `"
			oColumn:SetProperty("Def",17/*exCellValueFormat*/,1)
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:SetProperty("Def",2/*exCellHasButton*/,.T.)
			oColumn:SetProperty("Def",3/*exCellButtonAutoWidth*/,.T.)
		oG2antt:Columns():Add("")
		oG2antt:DrawGridLines := 2/*exVLines*/
		oG2antt:DefaultItemHeight := 20
		oItems := oG2antt:Items()
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1816
Is it possible to have a CheckBox and Button TOGETHER on all cells in a column

PROCEDURE OnButtonClick(oG2antt,Item,ColIndex,Key)
	DevOut( "ButtonClick" )
	DevOut( Transform(Item,"") )
	DevOut( Transform(Key,"") )
RETURN

PROCEDURE OnCellStateChanged(oG2antt,Item,ColIndex)
	DevOut( "CellStateChanged" )
	DevOut( Transform(Item,"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:ButtonClick := {|Item,ColIndex,Key| OnButtonClick(oG2antt,Item,ColIndex,Key)} /*Occurs when user clicks on the cell's button.*/
		oG2antt:CellStateChanged := {|Item,ColIndex| OnCellStateChanged(oG2antt,Item,ColIndex)} /*Fired after cell's state has been changed.*/

		oG2antt:BeginUpdate()
		oG2antt:ColumnAutoResize := .T.
		oColumn := oG2antt:Columns():Add("")
			oColumn:AllowSizing := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 index ``"
		oColumn1 := oG2antt:Columns():Add("Def")
			oColumn1:AllowSizing := .F.
			oColumn1:Width := 48
			oColumn1:FormatColumn := "`     `"
			oColumn1:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn1:SetProperty("Def",2/*exCellHasButton*/,.T.)
			oColumn1:SetProperty("Def",3/*exCellButtonAutoWidth*/,.T.)
		oG2antt:Columns():Add("")
		oItems := oG2antt:Items()
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
			oItems:AddItem("")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1815
Does filtering work with umlauts / accents characters

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oColumn := oG2antt:Columns():Add("Names")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterType := 3/*exPattern*/
		oItems := oG2antt:Items()
			oItems:AddItem("Mantel")
			oItems:AddItem("Mechanik")
			oItems:AddItem("Motor")
			oItems:AddItem("Murks")
			oItems:AddItem("Märchen")
			oItems:AddItem("Möhren")
			oItems:AddItem("Mühle")
			oItems:AddItem("Sérigraphie")
		oG2antt:Columns:Item(0):Filter := "*ä*"
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1814
How can I temporarily disable resizing the overview part of the control

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oG2antt:OnResizeControl := 1024/*exDisableOverview*/
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:OverviewVisible := 69890/*exOverviewSplitter+exOverviewShowDateTimeScale+exOverviewAllowVerticalScroll+exOverviewShowAllVisible*/
			oChart:OverviewHeight := 32
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/11/2001")
			oItems:AddBar(oItems:AddItem("Item 2"),"Task","02/02/2001","02/11/2001")
			oItems:AddBar(oItems:AddItem("Item 3"),"Task","03/02/2001","03/11/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1813
Is it possible to resize the overview part of the control at runtime

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAAEhABVADg6AADACAxSDEMQBQKAAzQFAYbhgHCGAAGUYBRgmFgAQhFcZQSBcEgTDaMYzgMBYJhEMQyDSAUIjPEyMg0DjIIwgJIUaw0GSXIRkGQZChGJooTJQMrTZIEbQxHSkIyRVTmZACS5NRZPYy0FAkQhlFSbJBCOKwVomR5KUxTVg1DJwahLCKULLhGI7KgObIRSJOcZ1XAdCQ0cB0XpAC6LaqSA4nSjKcqwJKEZRJIyjJwgSrrWhePoJYBVAAQPQdDYaCivK5uWK6PqKUIlZBQGQVNS1MRrLSEcwgPKgAyzDadZzfQAWTZFTQjN61RgtXR6eyoAJ0aziFDVFo0WRlEwacorGhcbgPPrCRrxGBVNwgGOJo4kIeASB0Zw/iGDoym6dobh2XpiDWJo5HMd56h6dxjlICIEhQDQmDOIZUmQZZlAADpYHIEQ3nUGgNhCEIhAkawamAAAYEWRAGB2bA2EqYg2AyA4glgPgSgQYRIEI" +;
		"FoEmEeBWBiBphFAAgPDwDgDEycQ4A0Q5IwkDwjgyWA8k4SIsmUNoPEOFJbD0DhjHINA3E8Q4eDiDojhiYJmg+Ixokic4LmKQxiCkNk2CCX4DmGaA0nAN4NBiDJSDwTgTEycg4E0WIYlcPJiiiMJZhCTYpgCcw5g2OYOGWGQmCkEJkheYopGoVw1GSGQuA2ExIlOQJcDOZJzEDSJNBiAgiU4Q5GCeChNHkHJygsaBzGaCYimiCY0mMNZoCMWhUDUJ5pkYTIDk6YxwkwO5NlMOoch6JQJm4U4JCIMxWFSKbCBoKIgmJDAuDgKhohKIoTk0GhaHOJgNiMKJuDaaYzHCTYnAyaZmjSKIiDiCghjEYg6AaR4yk0OpOiFSQLAKNgjGcQ40lkMhOmqZo7DKTpzG6Pw3CmYx2HiNAsCqBh8h6Z5bh6T4oC0G4Im+OAtlMNpTjUTYDCKVo2C3QBLi6a5bH6YY4EyehzAGO4wEwDoejwK5rnK95vDgPJsDWTBjjSWA" +;
		"xnEK5aleNhriuawKi8Lp7H8HpHHGXBskyQpxguXwNgMTpDFiRZDnEExfBSPRvHuXwYkycYslae5NjMQwrDGNZxFyHINDsDRTBMKZKnKLIwm2S4xF0Jw8lKTIcm9eA0hyQwuksM5jiyVQwnQDQIlaVo0EyLwQlGcRNCME5EjKfYXGSWEhDMQ5QnOahHG6KwoFOCoFiOaBNlcdIjiQag7HOL0dwuxKC1aeNQI4BQihNDoEwXowxmh8CIL8Yg8ROBfASMcaIOR6CHBkMgLgrwUjLHkHMG4NQaBzE4MQaIyw5gxEsH0Dw9FBBNA6PUDoLwpjTHqF0N4WQShSHgGwcY2RkhdFCL8bYdwOivDqNse4fRnh5G+PYEgaR1B0E4B4D4ixxB4G8E8SI5R8D+DeJUc4eRPB/EaJ8DwpwojDHUPofwtxYjtH2F4d4sx3j7E+AcXo8B9geFCNYOIHhfg/GmPQPoXw3jZHuPoX4hxuj1H8J8T43RPhDEgM8eo/B/iQGuPw" +;
		"fxEh1guAIAwQAgCAg")
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:OverviewVisible := 69890/*exOverviewSplitter+exOverviewShowDateTimeScale+exOverviewAllowVerticalScroll+exOverviewShowAllVisible*/
			oChart:OverviewHeight := 32
			oChart:SetProperty("OverviewSelBackColor",0x1000000)
			oChart:SetProperty("OverviewBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 250,250,250 } )  , .F. ))
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/11/2001")
			oItems:AddBar(oItems:AddItem("Item 2"),"Task","02/02/2001","02/11/2001")
			oItems:AddBar(oItems:AddItem("Item 3"),"Task","03/02/2001","03/11/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1812
You've provided examples of how to create bars for each record of a MS Access table, however I would like to create a database connected Gantt that has multiple bars per item/resource. Could you please advise

PROCEDURE OnAddGroupItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Summary",oItems:CellValue(Item,2),oItems:CellValue(Item,4),"0")
		oItems:DefineSummaryBars(Item,"0",-3,"0")
		oItems:AddBar(Item,"SummaryB",oItems:CellValue(Item,2),oItems:CellValue(Item,4),"1")
		oItems:DefineSummaryBars(Item,"1",-3,"1")
		oItems:SetProperty("ItemBackColor",Item,AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
	oG2antt:Chart():SetProperty("ItemBackColor",Item,AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
RETURN

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Task",oItems:CellValue(Item,2),oItems:CellValue(Item,4),oItems:ItemBar(Item,"",256/*exBarsCount*/))
		oItems:AddBar(Item,"TaskB",oItems:CellValue(Item,3),oItems:CellValue(Item,4),oItems:ItemBar(Item,"",256/*exBarsCount*/))
RETURN

PROCEDURE OnMouseDown(oG2antt,Button,Shift,X,Y)
	LOCAL i
	i := oG2antt:ItemFromPoint(-1,-1,c,hit)
	oG2antt:FullRowSelect := oG2antt:Columns:Item(c):Data()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar,oBar1,oBar2,oBar3
	LOCAL oChart
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddGroupItem := {|Item| OnAddGroupItem(oG2antt,Item)} /*Occurs after a new Group Item has been inserted to Items collection.*/
		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/
		oG2antt:MouseDown := {|Button,Shift,X,Y| OnMouseDown(oG2antt,Button,Shift,X,Y)} /*Occurs when the user presses a mouse button.*/

		oG2antt:BeginUpdate()
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:HeaderHeight := 22
		oG2antt:HeaderAppearance := 1/*Flat*/
		oG2antt:SetProperty("BackColorLock",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:SetProperty("BackColorHeader",oG2antt:BackColorLock())
		oG2antt:HasLines := 0/*exNoLine*/
		oG2antt:ColumnAutoResize := .F.
		oG2antt:SortBarVisible := .F.
		oG2antt:AllowGroupBy := .T.
		oG2antt:ReadOnly := -1/*exReadOnly*/
		oG2antt:ShowFocusRect := .F.
		oG2antt:CountLockedColumns := 1
		oG2antt:AutoDrag := 16/*exAutoDragScroll*/
		oG2antt:SingleSort := .F.
		oG2antt:ColumnsAllowSizing := .T.
		oG2antt:DrawGridLines := -1/*exAllLines*/
		oG2antt:GridLineStyle := 48/*exGridLinesSolid*/
		oG2antt:SetProperty("GridLineColor",AutomationTranslateColor( GraMakeRGBColor  ( { 220,220,220 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/01/1994"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,256)
			oBar := oChart:Bars:Item("Task")
				oBar:Height := 15
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
				oBar:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 204,204,0 } )  , .F. ))
				oBar:SetProperty("EndColor",oBar:StartColor())
				oBar:OverlaidType := 3/*exOverlaidBarsStack*/
				oBar:OverlaidGroup := "Task,TaskB"
				oBar:Pattern := 96/*exPatternGradientVBox+exPatternBox*/
			oBar1 := oChart:Bars():CallMethod("Copy","Task","TaskB")
				oBar1:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
				oBar1:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 153,153,0 } )  , .F. ))
				oBar1:SetProperty("EndColor",oBar1:StartColor())
			oBar2 := oChart:Bars:Item("Summary")
				oBar2:OverlaidType := 3/*exOverlaidBarsStack*/
				oBar2:OverlaidGroup := "Summary,SummaryB"
				oBar2:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 204,204,0 } )  , .F. ))
				oBar2:SetProperty("StartColor",oBar2:Color())
				oBar2:SetProperty("EndColor",oBar2:Color())
			oBar3 := oChart:Bars():CallMethod("Copy","Summary","SummaryB")
				oBar3:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 153,153,0 } )  , .F. ))
				oBar3:SetProperty("StartColor",oBar3:Color())
				oBar3:SetProperty("EndColor",oBar3:Color())
		oG2antt:SetProperty("BackColorSortBar",oG2antt:BackColor())
		oG2antt:ColumnAutoResize := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:Debug := .T.
		oG2antt:Columns:Item(0):Data := -1
		oG2antt:Layout := "singlesort=" + CHR(34) + "C5:1" + CHR(34) + ";multiplesort=" + CHR(34) + " C1:2" + CHR(34) + ""
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1811
How can I filter for multiple captions on a single column, using OR clause

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems
	LOCAL h0

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ColumnAutoResize := .T.
		oG2antt:ContinueColumnScroll := .F.
		oG2antt:MarkSearchColumn := .T.
		oG2antt:SearchColumnIndex := 1
		oG2antt:FilterBarPromptVisible := -1/*0xffffc0e8+exFilterBarTop+exFilterBarShort+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oColumns := oG2antt:Columns()
			oColumns:Add("Name"):Width := 96
			oColumn := oColumns:Add("Title")
				oColumn:Width := 96
			oColumns:Add("City")
		oItems := oG2antt:Items()
			h0 := oItems:AddItem("Nancy Davolio")
			oItems:SetProperty("CellValue",h0,1,"Sales Representative")
			oItems:SetProperty("CellValue",h0,2,"Seattle")
			h0 := oItems:AddItem("Andrew Fuller")
			oItems:SetProperty("CellValue",h0,1,"Vice President, Sales")
			oItems:SetProperty("CellValue",h0,2,"Tacoma")
			oItems:SetProperty("SelectItem",h0,.T.)
			h0 := oItems:AddItem("Janet Leverling")
			oItems:SetProperty("CellValue",h0,1,"Sales Representative")
			oItems:SetProperty("CellValue",h0,2,"Kirkland")
			h0 := oItems:AddItem("Margaret Peacock")
			oItems:SetProperty("CellValue",h0,1,"Sales Representative")
			oItems:SetProperty("CellValue",h0,2,"Redmond")
			h0 := oItems:AddItem("Steven Buchanan")
			oItems:SetProperty("CellValue",h0,1,"Sales Manager")
			oItems:SetProperty("CellValue",h0,2,"London")
			h0 := oItems:AddItem("Michael Suyama")
			oItems:SetProperty("CellValue",h0,1,"Sales Representative")
			oItems:SetProperty("CellValue",h0,2,"London")
			h0 := oItems:AddItem("Robert King")
			oItems:SetProperty("CellValue",h0,1,"Sales Representative")
			oItems:SetProperty("CellValue",h0,2,"London")
			h0 := oItems:AddItem("Laura Callahan")
			oItems:SetProperty("CellValue",h0,1,"Inside Sales Coordinator")
			oItems:SetProperty("CellValue",h0,2,"Seattle")
			h0 := oItems:AddItem("Anne Dodsworth")
			oItems:SetProperty("CellValue",h0,1,"Sales Representative")
			oItems:SetProperty("CellValue",h0,2,"London")
		oG2antt:FilterBarPromptColumns := "1"
		oG2antt:FilterBarPromptPattern := "Vice Inside"
		oG2antt:FilterBarPromptType := 2/*exFilterPromptContainsAny*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1810
How can I filter for multiple captions on a single column, using AND clause

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oColumns
	LOCAL oItems
	LOCAL h0

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ColumnAutoResize := .T.
		oG2antt:ContinueColumnScroll := .F.
		oG2antt:MarkSearchColumn := .T.
		oG2antt:SearchColumnIndex := 1
		oG2antt:FilterBarPromptVisible := -1/*0xffffc0e8+exFilterBarTop+exFilterBarShort+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oColumns := oG2antt:Columns()
			oColumns:Add("Name"):Width := 96
			oColumn := oColumns:Add("Title")
				oColumn:Width := 96
			oColumns:Add("City")
		oItems := oG2antt:Items()
			h0 := oItems:AddItem("Nancy Davolio")
			oItems:SetProperty("CellValue",h0,1,"Sales Representative")
			oItems:SetProperty("CellValue",h0,2,"Seattle")
			h0 := oItems:AddItem("Andrew Fuller")
			oItems:SetProperty("CellValue",h0,1,"Vice President, Sales")
			oItems:SetProperty("CellValue",h0,2,"Tacoma")
			oItems:SetProperty("SelectItem",h0,.T.)
			h0 := oItems:AddItem("Janet Leverling")
			oItems:SetProperty("CellValue",h0,1,"Sales Representative")
			oItems:SetProperty("CellValue",h0,2,"Kirkland")
			h0 := oItems:AddItem("Margaret Peacock")
			oItems:SetProperty("CellValue",h0,1,"Sales Representative")
			oItems:SetProperty("CellValue",h0,2,"Redmond")
			h0 := oItems:AddItem("Steven Buchanan")
			oItems:SetProperty("CellValue",h0,1,"Sales Manager")
			oItems:SetProperty("CellValue",h0,2,"London")
			h0 := oItems:AddItem("Michael Suyama")
			oItems:SetProperty("CellValue",h0,1,"Sales Representative")
			oItems:SetProperty("CellValue",h0,2,"London")
			h0 := oItems:AddItem("Robert King")
			oItems:SetProperty("CellValue",h0,1,"Sales Representative")
			oItems:SetProperty("CellValue",h0,2,"London")
			h0 := oItems:AddItem("Laura Callahan")
			oItems:SetProperty("CellValue",h0,1,"Inside Sales Coordinator")
			oItems:SetProperty("CellValue",h0,2,"Seattle")
			h0 := oItems:AddItem("Anne Dodsworth")
			oItems:SetProperty("CellValue",h0,1,"Sales Representative")
			oItems:SetProperty("CellValue",h0,2,"London")
		oG2antt:FilterBarPromptColumns := "1"
		oG2antt:FilterBarPromptPattern := "Vice Sales"
		oG2antt:FilterBarPromptType := 1/*exFilterPromptContainsAll*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1809
How can I display the limits/margins of the project, in the overview part of the control

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAAEhABVADg6AADACAxSDEMQBQKAAzQFAYbhgHCGAAGUYBRgmFgAQhFcZQSBcEgTDaMYzgMBYJhEMQyDSAUIjPEyMg0DjIIwgJIUaw0GSXIRkGQZChGJooTJQMrTZIEbQxHSkIyRVTmZACS5NRZPYy0FAkQhlFSbJBCOKwVomR5KUxTVg1DJwahLCKULLhGI7KgObIRSJOcZ1XAdCQ0cB0XpAC6LaqSA4nSjKcqwJKEZRJIyjJwgSrrWhePoJYBVAAQPQdDYaCivK5uWK6PqKUIlZBQGQVNS1MRrLSEcwgPKgAyzDadZzfQAWTZFTQjN61RgtXR6eyoAJ0aziFDVFo0WRlEwacorGhcbgPPrCRrxGBVNwgGOJo4kIeASB0Zw/iGDoym6dobh2XpiDWJo5HMd56h6dxjlICIEhQDQmDOIZUmQZZlAADpYHIEQ3nUGgNhCEIhAkawamAAAYEWRAGB2bA2EqYg2AyA4glgPgSgQYRIEI" +;
		"FoEmEeBWBiBphFAAgPDwDgDEycQ4A0Q5IwkDwjgyWA8k4SIsmUNoPEOFJbD0DhjHINA3E8Q4eDiDojhiYJmg+Ixokic4LmKQxiCkNk2CCX4DmGaA0nAN4NBiDJSDwTgTEycg4E0WIYlcPJiiiMJZhCTYpgCcw5g2OYOGWGQmCkEJkheYopGoVw1GSGQuA2ExIlOQJcDOZJzEDSJNBiAgiU4Q5GCeChNHkHJygsaBzGaCYimiCY0mMNZoCMWhUDUJ5pkYTIDk6YxwkwO5NlMOoch6JQJm4U4JCIMxWFSKbCBoKIgmJDAuDgKhohKIoTk0GhaHOJgNiMKJuDaaYzHCTYnAyaZmjSKIiDiCghjEYg6AaR4yk0OpOiFSQLAKNgjGcQ40lkMhOmqZo7DKTpzG6Pw3CmYx2HiNAsCqBh8h6Z5bh6T4oC0G4Im+OAtlMNpTjUTYDCKVo2C3QBLi6a5bH6YY4EyehzAGO4wEwDoejwK5rnK95vDgPJsDWTBjjSWA" +;
		"xnEK5aleNhriuawKi8Lp7H8HpHHGXBskyQpxguXwNgMTpDFiRZDnEExfBSPRvHuXwYkycYslae5NjMQwrDGNZxFyHINDsDRTBMKZKnKLIwm2S4xF0Jw8lKTIcm9eA0hyQwuksM5jiyVQwnQDQIlaVo0EyLwQlGcRNCME5EjKfYXGSWEhDMQ5QnOahHG6KwoFOCoFiOaBNlcdIjiQag7HOL0dwuxKC1aeNQI4BQihNDoEwXowxmh8CIL8Yg8ROBfASMcaIOR6CHBkMgLgrwUjLHkHMG4NQaBzE4MQaIyw5gxEsH0Dw9FBBNA6PUDoLwpjTHqF0N4WQShSHgGwcY2RkhdFCL8bYdwOivDqNse4fRnh5G+PYEgaR1B0E4B4D4ixxB4G8E8SI5R8D+DeJUc4eRPB/EaJ8DwpwojDHUPofwtxYjtH2F4d4sx3j7E+AcXo8B9geFCNYOIHhfg/GmPQPoXw3jZHuPoX4hxuj1H8J8T43RPhDEgM8eo/B/iQGuPw" +;
		"fxEh1guAIAwQAgCAg")
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:OverviewVisible := 31746/*0x400+exOverviewShowSelMargins+exOverviewShowMargins+exOverviewShowDateTimeScaleBottom+exOverviewShowAllVisible*/
			oChart:OverviewHeight := 64
			oChart:SetProperty("OverviewSelBackColor",0x1000000)
			oChart:SetProperty("OverviewBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 250,250,250 } )  , .F. ))
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/11/2001")
			oItems:AddBar(oItems:AddItem("Item 2"),"Task","02/02/2001","02/11/2001")
			oItems:AddBar(oItems:AddItem("Item 3"),"Task","03/02/2001","03/11/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1808
Is it possible to display a time-scale for the overview part of the control (separated)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:OverviewVisible := 5122/*exOverviewShowDateTimeScaleSplit+exOverviewShowAllVisible*/
			oChart:OverviewHeight := 48
			oChart:LevelCount := 2
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/11/2001")
			oItems:AddBar(oItems:AddItem("Item 2"),"Task","02/02/2001","02/11/2001")
			oItems:AddBar(oItems:AddItem("Item 3"),"Task","03/02/2001","03/11/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1807
Is it possible to display a time-scale for the overview part of the control

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:OverviewVisible := 4098/*exOverviewShowDateTimeScale+exOverviewShowAllVisible*/
			oChart:LevelCount := 2
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/11/2001")
			oItems:AddBar(oItems:AddItem("Item 2"),"Task","02/02/2001","02/11/2001")
			oItems:AddBar(oItems:AddItem("Item 3"),"Task","03/02/2001","03/11/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1806
How can I display the time-scale only, in the overview part of the control

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:OverviewVisible := 4610/*exOverviewShowDateTimeScale+exOverviewHideBars+exOverviewShowAllVisible*/
			oChart:LevelCount := 2
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/11/2001")
			oItems:AddBar(oItems:AddItem("Item 2"),"Task","02/02/2001","02/11/2001")
			oItems:AddBar(oItems:AddItem("Item 3"),"Task","03/02/2001","03/11/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1805
How can I detect that the mouse pointer is within an InsideZoom object
PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	LOCAL oChart
	LOCAL d,iz
	oChart := oG2antt:Chart()
		d := oChart:DateFromPoint(-1,-1)
		iz := oChart:InsideZooms:Contains(d)
		DevOut( Transform(d,"") )
		DevOut( "If the iz object is nothing, the date is not zoomed, else it is." )
		DevOut( Transform(iz,"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:LevelCount := 2
			oChart:FirstWeekDay := 1/*exMonday*/
			oChart:AllowInsideZoom := .T.
			oChart:InsideZooms():Add("01/10/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1804
Is it possible to word-wrap text/caption on the bar, so it gets displayed on multiple lines

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar,oBar1
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:ItemsAllowSizing := -1/*exResizeItem*/
		oG2antt:DrawGridLines := 1/*exHLines*/
		oG2antt:HeaderHeight := 28
		oG2antt:DefaultItemHeight := 24
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oG2antt:HeaderAppearance := 5/*Bump*/
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:DrawGridLines := 1/*exHLines*/
			oBar := oChart:Bars():CallMethod("Copy","Task","TaskB")
				oBar:Height := 15
				oBar:Pattern := 32/*exPatternBox*/
				oBar:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 204,232,255 } )  , .F. ))
				oBar:SetProperty("EndColor",oBar:StartColor())
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
			oBar1 := oChart:Bars:Item("Task")
				oBar1:Height := -1
				oBar1:Pattern := 32/*exPatternBox*/
				oBar1:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 204,232,255 } )  , .F. ))
				oBar1:SetProperty("EndColor",oBar1:StartColor())
				oBar1:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
		oItems := oG2antt:Items()
			h := oItems:AddItem("Word-Wrap Inside")
			oItems:AddBar(h,"Task","01/09/2001","01/13/2001","A1")
			oItems:SetProperty("ItemBar",h,"A1",53/*exBarBackgroundExt*/,"none[(2,2,100%-4,100%-4),text=`This is a bit of text that should break the line`,wordwrap]")
			h := oItems:AddItem("Word-Wrap Inside")
			oItems:AddBar(h,"Task","01/05/2001","01/19/2001","A2")
			oItems:SetProperty("ItemBar",h,"A2",53/*exBarBackgroundExt*/,"none[(2,2,100%-4,100%-4),align=0x11,text=`This is a bit of text that should break the line`,wordwrap]")
			h := oItems:AddItem("Word-Wrap Back")
			oItems:AddBar(h,"TaskB","01/09/2001","01/13/2001","A3")
			oItems:SetProperty("ItemBar",h,"A3",53/*exBarBackgroundExt*/,"client[align=0x11,text=`This is a bit of text that should break the line`,wordwrap]")
			oItems:SetProperty("ItemBar",h,"A3",54/*exBarBackgroundExtFlags*/,2)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1803
Can I set the search box / filterbarprompt to invisible, so I can use my own input and *string* via VBA
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumns
	LOCAL oItems
	LOCAL h0

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ColumnAutoResize := .T.
		oG2antt:ContinueColumnScroll := .F.
		oG2antt:MarkSearchColumn := .F.
		oG2antt:SearchColumnIndex := 1
		oG2antt:FilterBarHeight := 0
		oG2antt:FilterBarPromptVisible := -1/*0xffffc0e8+exFilterBarTop+exFilterBarShort+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oColumns := oG2antt:Columns()
			oColumns:Add("Name"):Width := 96
			oColumns:Add("Title"):Width := 96
			oColumns:Add("City")
		oItems := oG2antt:Items()
			h0 := oItems:AddItem("Nancy Davolio")
			oItems:SetProperty("CellValue",h0,1,"Sales Representative")
			oItems:SetProperty("CellValue",h0,2,"Seattle")
			h0 := oItems:AddItem("Andrew Fuller")
			oItems:SetProperty("CellValue",h0,1,"Vice President, Sales")
			oItems:SetProperty("CellValue",h0,2,"Tacoma")
			oItems:SetProperty("SelectItem",h0,.T.)
			h0 := oItems:AddItem("Janet Leverling")
			oItems:SetProperty("CellValue",h0,1,"Sales Representative")
			oItems:SetProperty("CellValue",h0,2,"Kirkland")
			h0 := oItems:AddItem("Margaret Peacock")
			oItems:SetProperty("CellValue",h0,1,"Sales Representative")
			oItems:SetProperty("CellValue",h0,2,"Redmond")
			h0 := oItems:AddItem("Steven Buchanan")
			oItems:SetProperty("CellValue",h0,1,"Sales Manager")
			oItems:SetProperty("CellValue",h0,2,"London")
			h0 := oItems:AddItem("Michael Suyama")
			oItems:SetProperty("CellValue",h0,1,"Sales Representative")
			oItems:SetProperty("CellValue",h0,2,"London")
			h0 := oItems:AddItem("Robert King")
			oItems:SetProperty("CellValue",h0,1,"Sales Representative")
			oItems:SetProperty("CellValue",h0,2,"London")
			h0 := oItems:AddItem("Laura Callahan")
			oItems:SetProperty("CellValue",h0,1,"Inside Sales Coordinator")
			oItems:SetProperty("CellValue",h0,2,"Seattle")
			h0 := oItems:AddItem("Anne Dodsworth")
			oItems:SetProperty("CellValue",h0,1,"Sales Representative")
			oItems:SetProperty("CellValue",h0,2,"London")
		oG2antt:FilterBarPromptPattern := "London"
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1802
How to load a hierarchy using the control's DataSource property (Parent-ID-Relation)

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:SetParent(Item,oItems:FindItem(oItems:CellValue(Item,"ReportsTo"),"EmployeeID"))
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL rs

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:ColumnAutoResize := .F.
		oG2antt:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("SELECT * FROM Employees ORDER BY ReportsTo","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:Items():SetProperty("ExpandItem",0,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1801
How can I highlight the limits/margins of a summary bar, according with the child bars

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oChart
	LOCAL oItems
	LOCAL hSummary,hTask

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:Add(1,"gBFLBCJwBAEHhEJAAEhABRkIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjhwkAIIQK/cZRPC0Ow8GSEZAgOKIch6FgCQjEIxDKIsVRZEiDYRmGLpIiOJoWSQBUIyJKoAQ0f6fIziaTpNiGL4yTBPMzyJRcEx1GyBZ5negaAo2AwIQiUBomGahajkMqZQAJaCSCI2Y4eDZCIoTXR1WAxDq3ZruKpLUpOc4DOrEMIwCEBA=")
			oAppearance:Add(2,"CP:1 -4 0 5 0")
			oAppearance:Add(3,"gBFLBCJwBAEHhEJAAEhABOMGACAADACAxSDEMQBQKAAzQFAYbhgHCGAAGUYBRgmFgAQhFcZQSKUOQTDKMIziYBYJhEMQyDAAUIjOKsIhkGYcZAGQBJCjWGodQRHc5TNCMTRRECDY4kAYpAiKRYbSpAcyQHQ8bQtHwYKAoOg6JjWIAHRqCMI0XINHQ3FwaRJsCwoJhOZIDWZENDQTSsLSxJSkIRfe4wArNf4XVBVMqSdKEZRJLybJwADApAo2eIlQjJdQ4TSdBSdQwDLYhECpbwCT6JT7jGLQJZsNyvBLIYDrKA8UozFqHQRYNhxDZNShhM6rMigPQQAq8AKlRbVNzXLamLwHRS9BpoORhUjHD4bVxVOyaPpAAaBFbhI44QZOHYNYfjgaI0BySp8HMVZdlgaxtBqexWkqOw1lGbZzlwfQ0AwYR/gka5FiMGpgkQYYviGV4kBUWpmlsaYGHMEgACECQUAaEYMHQHRHCGFRBECRJkGQQgTGCVBoDYQhCgQ" +;
		"JZoG4EIAGEFwGB+dwxHaB5iAabReggYhGnUToJGIRgCCiCBdjiNguGmYo4gIKoMGIKIeDSCYTGiXg4EITo3hAiJAICA==")
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:Bars:Item("Summary"):SetProperty("Color",0x3000000)
		oItems := oG2antt:Items()
			hSummary := oItems:AddItem("Summary")
			oItems:AddBar(hSummary,"Summary","01/02/2001","01/02/2001","")
			hTask := oItems:InsertItem(hSummary,,"Task A")
			oItems:AddBar(hTask,"Task","01/02/2001","01/05/2001","K1")
			hTask := oItems:InsertItem(hSummary,,"Task B")
			oItems:AddBar(hTask,"Task","01/04/2001","01/08/2001","K2")
			hTask := oItems:InsertItem(hSummary,,"Task C")
			oItems:AddBar(hTask,"Task","01/06/2001","01/10/2001","K3")
			oItems:SetProperty("ExpandItem",hSummary,.T.)
			oItems:DefineSummaryBars(hSummary,"",-1,"<*>")
			oItems:SetProperty("ItemBar",hSummary,"",34/*exSummaryBarBackColor*/,33554432)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN